| @@ 23-34 (lines=12) @@ | ||
| 20 | ||
| 21 | protected $locker; |
|
| 22 | ||
| 23 | public function spinup() { |
|
| 24 | ||
| 25 | $configuration = $this->getConfiguration(); |
|
| 26 | ||
| 27 | $base_path = $configuration->get('base-path'); |
|
| 28 | $lock_path = $configuration->get('run-path'); |
|
| 29 | $lock_file = "$base_path/$lock_path/queue.worker.lock"; |
|
| 30 | ||
| 31 | $this->locker = new Locker($lock_file); |
|
| 32 | $this->locker->lock([]); |
|
| 33 | ||
| 34 | } |
|
| 35 | ||
| 36 | public function loop() { |
|
| 37 | ||
| @@ 25-38 (lines=14) @@ | ||
| 22 | ||
| 23 | protected $wakeup_time = 0; |
|
| 24 | ||
| 25 | public function spinup() { |
|
| 26 | ||
| 27 | $configuration = $this->getConfiguration(); |
|
| 28 | ||
| 29 | $base_path = $configuration->get('base-path'); |
|
| 30 | $lock_path = $configuration->get('run-path'); |
|
| 31 | $lock_file = "$base_path/$lock_path/schedule.worker.lock"; |
|
| 32 | ||
| 33 | $this->locker = new Locker($lock_file); |
|
| 34 | $this->locker->lock([]); |
|
| 35 | ||
| 36 | $this->getEvents()->subscribe('daemon.worker.refresh', '\Comodojo\Extender\Listeners\RefreshScheduler'); |
|
| 37 | ||
| 38 | } |
|
| 39 | ||
| 40 | public function loop() { |
|
| 41 | ||