| Conditions | 3 |
| Paths | 1 |
| Total Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 47 | public function handle() |
||
| 48 | { |
||
| 49 | $kernel = new Kernel(); |
||
| 50 | //$endpoints = Endpoint::get(); |
||
| 51 | |||
| 52 | Endpoint::orderBy('id')->chunk(100, function ($endpoints) use ($kernel) { |
||
| 53 | foreach ($endpoints as $endpoint) { |
||
| 54 | $kernel->add( |
||
| 55 | new PingEndPoint($endpoint, $this->client) |
||
| 56 | )->everyMinutes( |
||
| 57 | $this->isForced() ? 1 : $endpoint->frequency |
||
| 58 | ); |
||
| 59 | } |
||
| 60 | $kernel->run(); |
||
| 61 | }); |
||
| 62 | } |
||
| 63 | } |
||
| 64 |