diff options
| author | JLGC @monolinux <monolinux@junglacode.org> | 2016-08-15 23:13:16 -0500 |
|---|---|---|
| committer | JLGC @monolinux <monolinux@junglacode.org> | 2016-08-15 23:13:16 -0500 |
| commit | 683c0464093f6a7976236c68653c2a2cc5dae280 (patch) | |
| tree | bf176ecd82415cc4952eea071b7d264dd5fd68b4 /app/Core/Queue/QueueManager.php | |
| parent | b1e795fc5b45369f7b9b565b1e106d2673361977 (diff) | |
| parent | 5f82a942c0011bf91947b2c1d627c0907bda0c92 (diff) | |
Merge https://github.com/kanboard/kanboard
Diffstat (limited to 'app/Core/Queue/QueueManager.php')
| -rw-r--r-- | app/Core/Queue/QueueManager.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/Core/Queue/QueueManager.php b/app/Core/Queue/QueueManager.php index f34cb220..dcf0ebf5 100644 --- a/app/Core/Queue/QueueManager.php +++ b/app/Core/Queue/QueueManager.php @@ -42,9 +42,13 @@ class QueueManager extends Base */ public function push(BaseJob $job) { + $jobClassName = get_class($job); + if ($this->queue !== null) { + $this->logger->debug(__METHOD__.': Job pushed in queue: '.$jobClassName); $this->queue->push(JobHandler::getInstance($this->container)->serializeJob($job)); } else { + $this->logger->debug(__METHOD__.': Job executed synchronously: '.$jobClassName); call_user_func_array(array($job, 'execute'), $job->getJobParams()); } @@ -60,7 +64,7 @@ class QueueManager extends Base public function listen() { if ($this->queue === null) { - throw new LogicException('No Queue Driver defined!'); + throw new LogicException('No queue driver defined!'); } while ($job = $this->queue->pull()) { |
