/** * 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; }
/** * 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; }
/** * Determine if the application is in maintenance mode. * * @return bool * @static */ public static function isDownForMaintenance() { return \Illuminate\Queue\QueueManager::isDownForMaintenance(); }
/** * Determine if the daemon should process on this iteration. * * @return bool */ protected function daemonShouldRun() { return !$this->manager->isDownForMaintenance(); }