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