option('uid'); $bulk = $this->option('bulk'); $examRep = new ExamRepository(); $log = "uid: $uid, bulk: $bulk"; $this->info($log); if (is_numeric($uid) && $uid) { $log .= ", do updateProgress"; $result = $examRep->updateProgress($uid); } elseif ($bulk) { $result = $examRep->updateProgressBulk(); $log .= ", do updateProgressBulk"; } else { $this->error("specific uid or bulk."); return 0; } $this->info(nexus()->getRequestId() . ", $log, result: " . var_export($result, true)); return 0; } }