本文整理汇总了PHP中Illuminate\Queue\QueueManager::isDownForMaintenance方法的典型用法代码示例。如果您正苦于以下问题:PHP QueueManager::isDownForMaintenance方法的具体用法?PHP QueueManager::isDownForMaintenance怎么用?PHP QueueManager::isDownForMaintenance使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Illuminate\Queue\QueueManager
的用法示例。
在下文中一共展示了QueueManager::isDownForMaintenance方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: daemonShouldRun
/**
* Determine if the daemon should process on this iteration.
*
* @return bool
*/
protected function daemonShouldRun()
{
if ($this->manager->isDownForMaintenance()) {
return false;
}
return $this->events->until('illuminate.queue.looping') !== false;
}
示例2: daemonShouldRun
/**
* Determine if the daemon should process on this iteration.
*
* @return bool
*/
protected function daemonShouldRun()
{
if ($this->manager->isDownForMaintenance() || $this->events->until('illuminate.queue.looping') === false) {
// If the application is down for maintenance or doesn't want the queues to run
// we will sleep for one second just in case the developer has it set to not
// sleep at all. This just prevents CPU from maxing out in this situation.
$this->sleep(1);
return false;
}
return true;
}
示例3: isDownForMaintenance
/**
* Determine if the application is in maintenance mode.
*
* @return bool
* @static
*/
public static function isDownForMaintenance()
{
return \Illuminate\Queue\QueueManager::isDownForMaintenance();
}
示例4: daemonShouldRun
/**
* Determine if the daemon should process on this iteration.
*
* @return bool
*/
protected function daemonShouldRun()
{
return !$this->manager->isDownForMaintenance();
}