public static function createJob(array $tags = array()) { $clusterServerModel = new Model_ClusterServer(); if (!($serverId = $clusterServerModel->fetchServerId())) { list($serverId, $lastCheckIn) = $clusterServerModel->checkIn(); } $jobModel = new Model_ClusterClearCacheJob(); $jobModel->create($serverId, $tags); }
public function run() { $clusterServerModel = new Model_ClusterServer(); list($serverId, $lastCheckIn) = $clusterServerModel->checkIn(); $this->_runCacheClearJobs($serverId, $lastCheckIn); $this->_runScheduledJobs($serverId, $lastCheckIn); $this->_runRecurringJobs($serverId, $lastCheckIn); return true; }