/** * @keepalive */ public function startLocal() { $this->_clockworkManager = new CM_Clockwork_Manager(); $storage = new CM_Clockwork_Storage_FileSystem('app-maintenance-local'); $storage->setServiceManager(CM_Service_Manager::getInstance()); $this->_clockworkManager->setStorage($storage); $this->_registerCallbacksLocal(); $this->_clockworkManager->start(); }
/** * @keepalive */ public function startMaintenance() { $clockwork = new CM_Clockwork_Manager(); $storage = new CM_Clockwork_Storage_FileSystem('search-maintenance'); $storage->setServiceManager(CM_Service_Manager::getInstance()); $clockwork->setStorage($storage); $clockwork->registerCallback('search-index-update', '1 minute', array($this, 'update')); $clockwork->registerCallback('search-index-optimize', '1 hour', array($this, 'optimize')); $clockwork->start(); }