示例#1
0
文件: EYiiron.php 项目: br0sk/yiiron
 /**
  * List Tasks
  *
  * @param int $page Page. Default is 0, maximum is 100.
  * @param int $per_page The number of tasks to return per page. Default is 30, maximum is 100.
  * @param array $options Optional URL Parameters
  * Filter by Status: the parameters queued, running, complete, error, cancelled, killed, and timeout will all filter by their respective status when given a value of 1. These parameters can be mixed and matched to return tasks that fall into any of the status filters. If no filters are provided, tasks will be displayed across all statuses.
  * - "from_time" Limit the retrieved tasks to only those that were created after the time specified in the value. Time should be formatted as the number of seconds since the Unix epoch.
  * - "to_time" Limit the retrieved tasks to only those that were created before the time specified in the value. Time should be formatted as the number of seconds since the Unix epoch.
  * @return mixed
  * @throws CException
  */
 public function workerGetTasks($page = 0, $per_page = 30, $options = array())
 {
     try {
         return $this->_worker->getTasks($page, $per_page, $options);
     } catch (Exception $e) {
         Yii::log('Error in IronWorker: ' . $e->getMessage(), 'error', 'ext.yiiron');
         throw new CException($e->getMessage());
     }
 }