Beispiel #1
0
 /**
  * gc
  *
  * This is a wrapper function for all of the different cleaning
  * functions, it runs them in an order that resembles correctness.
  */
 public static function gc()
 {
     debug_event('catalog', 'Database cleanup started', 5);
     Song::gc();
     Album::gc();
     Artist::gc();
     Video::gc();
     Art::gc();
     Stats::gc();
     Rating::gc();
     Userflag::gc();
     Useractivity::gc();
     Playlist::gc();
     Tmp_Playlist::gc();
     Shoutbox::gc();
     Tag::gc();
     // TODO: use InnoDB with foreign keys and on delete cascade to get rid of garbage collection
     \Lib\Metadata\Repository\Metadata::gc();
     \Lib\Metadata\Repository\MetadataField::gc();
     debug_event('catalog', 'Database cleanup ended', 5);
 }
Beispiel #2
0
 /**
  * gc
  *
  * This is a wrapper function for all of the different cleaning
  * functions, it runs them in an order that resembles correctness.
  */
 public static function gc()
 {
     debug_event('catalog', 'Database cleanup started', 5);
     Song::gc();
     Album::gc();
     Artist::gc();
     Art::gc();
     Stats::gc();
     Rating::gc();
     Userflag::gc();
     Playlist::gc();
     Tmp_Playlist::gc();
     Shoutbox::gc();
     Tag::gc();
     debug_event('catalog', 'Database cleanup ended', 5);
 }
Beispiel #3
0
 /**
  * gc
  *
  * This function is randomly called and it cleans up the spoo
  */
 public static function gc()
 {
     $sql = 'DELETE FROM `session` WHERE `expire` < ?';
     Dba::write($sql, array(time()));
     // Also clean up things that use sessions as keys
     Query::gc();
     Tmp_Playlist::gc();
     Stream_Playlist::gc();
     Song_Preview::gc();
     return true;
 }