for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php declare(strict_types=1);
/**
* ownCloud - Music app
*
* This file is licensed under the Affero General Public License version 3 or
* later. See the COPYING file.
* @author Morris Jobke <[email protected]>
* @copyright Morris Jobke 2013, 2014
*/
namespace OCA\Music\Backgroundjob;
use \OCA\Music\App\Music;
class Cleanup {
* Run background cleanup task
public static function run() {
$app = new Music();
$container = $app->getContainer();
// remove orphaned entities
$container->query('Maintenance')->cleanUp();
// remove expired sessions
$container->query('AmpacheSessionMapper')->cleanUp();
// find covers - TODO performance stuff - maybe just call this once in an hour
$container->query('Scanner')->findAlbumCovers();
}