/** * @param \Client\Tasks\SyncTask $task * @return bool */ public function processCacheImage($task) { $event = self::findFirst(['state = :state:', 'bind' => ['state' => self::IMAGE_CACHING]]); if ($event) { $this->getDI()->get('log')->error("Картинки уже кэшируются"); return false; } $this->state = self::IMAGE_CACHING; $this->save(); $task->putWatermarkAction(); $this->state = self::DONE; $this->save(); return true; }
protected function launchTask() { $sync = new SyncTask(); return $sync->updateBannerAction(); }
protected function launchTask() { $sync = new SyncTask(); return $sync->cacheImageAction(); }
protected function launchTask() { $sync = new SyncTask(); return $sync->updateContentAction(); }