Skip to content

Commit

Permalink
Kill the judging submission first with a keyboard interrupt on CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
Ninjaclasher committed Jun 13, 2020
1 parent f66008d commit 0c6832f
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions dmoj/commands/submit.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,13 @@ def execute(self, line):

self.judge.submission_id_counter += 1
self.judge.graded_submissions.append((problem_id, language_id, src, time_limit, memory_limit))
self.judge.begin_grading(
Submission(
self.judge.submission_id_counter, problem_id, language_id, src, time_limit, memory_limit, False, {}
),
blocking=True,
report=print,
)
try:
self.judge.begin_grading(
Submission(
self.judge.submission_id_counter, problem_id, language_id, src, time_limit, memory_limit, False, {}
),
blocking=True,
report=print,
)
except KeyboardInterrupt:
self.judge.abort_grading()

0 comments on commit 0c6832f

Please sign in to comment.