/** * Set a Task’s Progress. Work only inside a worker * * Example (inside a worker): * <code> * require_once "phar://iron_worker.phar"; * $worker = new IronWorker(); # assuming you have iron.json inside a worker * $worker->setCurrentTaskProgress(50, "Task is half-done"); * </code> * @param int $percent An integer, between 0 and 100 inclusive, that describes the completion of the task. * @param string $msg Any message or data describing the completion of the task. Must be a string value, and the 64KB request limit applies. * @return mixed * @throws CException */ public function workerSetCurrentTaskProgress($percent, $msg = '') { try { return $this->_worker->setCurrentTaskProgress($percent, $msg); } catch (Exception $e) { Yii::log('Error in IronWorker: ' . $e->getMessage(), 'error', 'ext.yiiron'); throw new CException($e->getMessage()); } }