本文整理汇总了PHP中CronTask::getTypes方法的典型用法代码示例。如果您正苦于以下问题:PHP CronTask::getTypes方法的具体用法?PHP CronTask::getTypes怎么用?PHP CronTask::getTypes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CronTask
的用法示例。
在下文中一共展示了CronTask::getTypes方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: stats
/**
* Display Some statistics about Finished Jobs.
*
* @return void
*/
public function stats()
{
$this->out('Jobs currenty in the Queue:');
$types = $this->CronTask->getTypes();
foreach ($types as $type) {
$this->out(" " . str_pad($type, 20, ' ', STR_PAD_RIGHT) . ": " . $this->CronTask->getLength($type));
}
$this->hr();
$this->out('Total unfinished Jobs : ' . $this->CronTask->getLength());
$this->hr();
$this->out('Finished Job Statistics:');
$data = $this->CronTask->getStats();
foreach ($data as $item) {
$this->out(" " . $item['CronTask']['jobtype'] . ": ");
$this->out(" Finished Jobs in Database: " . $item[0]['num']);
$this->out(" Average Job existence : " . $item[0]['alltime'] . 's');
$this->out(" Average Execution delay : " . $item[0]['fetchdelay'] . 's');
$this->out(" Average Execution time : " . $item[0]['runtime'] . 's');
}
}