Conditions | 3 |
Paths | 3 |
Total Lines | 19 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
43 | public function handle() |
||
44 | { |
||
45 | $time=Carbon::now(); |
||
46 | $this->line("<fg=yellow>[$time] Processing: </>Update JudgeServer Status"); |
||
47 | |||
48 | $platformIDs = JudgeServer::column('oid'); |
||
49 | $babel=new Babel(); |
||
50 | foreach ($platformIDs as $platform) { |
||
51 | try{ |
||
52 | $babel->monitor([ |
||
53 | "name" => OJ::findOrFail($platform)->ocode |
||
54 | ]); |
||
55 | } catch (Exception $e) { |
||
56 | Log::alert("Moniting OID $platform Failed.\n".$e->getMessage()); |
||
|
|||
57 | } |
||
58 | } |
||
59 | |||
60 | $time=Carbon::now(); |
||
61 | $this->line("<fg=green>[$time] Processed: </>Successfully Updated JudgeServer Status"); |
||
62 | } |
||
64 |