| Conditions | 6 |
| Paths | 6 |
| Total Lines | 27 |
| Code Lines | 18 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 41 | public function handle() |
||
| 42 | { |
||
| 43 | $time=Carbon::now(); |
||
| 44 | $this->line("<fg=yellow>[$time] Processing: </>Update Group Elo"); |
||
| 45 | |||
| 46 | $groupModel=new GroupModel(); |
||
| 47 | $ret=$groupModel->refreshAllElo(); |
||
| 48 | foreach ($ret as $gid => $group) { |
||
| 49 | if (empty($group['result'])) { |
||
| 50 | Log::channel('group_elo')->info('Refreshed Group Elo (Empty) : ('.$gid.')'.$group['name']); |
||
| 51 | } else { |
||
| 52 | Log::channel('group_elo')->info('Refreshing Group Elo: ('.$gid.')'.$group['name']); |
||
| 53 | foreach ($group['result'] as $contest) { |
||
| 54 | if ($contest['ret']=='success') { |
||
| 55 | Log::channel('group_elo')->info(' Elo Clac Successfully : ('.$contest['cid'].')'.$contest['name']); |
||
| 56 | } else { |
||
| 57 | Log::channel('group_elo')->info(' Elo Clac Faild (Judge Not Over) : ('.$contest['cid'].')'.$contest['name'].' sids:'); |
||
| 58 | foreach ($contest['submissions'] as $sid) { |
||
| 59 | Log::channel('group_elo')->info(' '.$sid['sid']); |
||
| 60 | } |
||
| 61 | } |
||
| 62 | } |
||
| 63 | } |
||
| 64 | } |
||
| 65 | |||
| 66 | $time=Carbon::now(); |
||
| 67 | $this->line("<fg=green>[$time] Processed: </>Successfully Updated Group Elo"); |
||
| 68 | } |
||
| 70 |