| Conditions | 1 |
| Paths | 1 |
| Total Lines | 9 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 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 | ->andWhere([ |
||
| 68 | 'or', |
||
| 69 | ['>', 'worker.pinged_at', time() - $this->env->workerPingInterval - 5], |
||
| 70 | ['exec.finished_at' => null], |
||
| 71 | ]); |
||
| 92 |