| Conditions | 1 |
| Paths | 1 |
| Total Lines | 13 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 62 | public function active() |
||
| 63 | { |
||
| 64 | return $this |
||
| 65 | ->andWhere(['worker.finished_at' => null]) |
||
| 66 | ->leftJoin(['exec' => ExecRecord::tableName()], '{{exec}}.[[id]] = {{worker}}.[[last_exec_id]]') |
||
| 67 | ->leftJoin(['push' => PushRecord::tableName()], '{{push}}.[[id]] = {{exec}}.[[push_id]]') |
||
| 68 | ->andWhere([ |
||
| 69 | 'or', |
||
| 70 | ['>', 'worker.pinged_at', time() - $this->env->workerPingInterval - 5], |
||
| 71 | [ |
||
| 72 | 'and', |
||
| 73 | ['is not', 'worker.last_exec_id', null], |
||
| 74 | ['exec.finished_at' => null], |
||
| 75 | ], |
||
| 97 |