diff --git a/judge/bridge/judge_handler.py b/judge/bridge/judge_handler.py index d81cafa..06db794 100644 --- a/judge/bridge/judge_handler.py +++ b/judge/bridge/judge_handler.py @@ -571,11 +571,11 @@ class JudgeHandler(ZlibPacketHandler): self._post_update_submission(submission.id, "grading-end", done=True) # Clean up submission source file (if any) - source_file = cache.get(f"submission_source_file:{submission.id}") - if source_file: - filepath = os.path.join(settings.DMOJ_SUBMISSION_ROOT, source_file) - if os.path.exists(filepath): - os.remove(filepath) + # source_file = cache.get(f"submission_source_file:{submission.id}") + # if source_file: + # filepath = os.path.join(settings.DMOJ_SUBMISSION_ROOT, source_file) + # if os.path.exists(filepath): + # os.remove(filepath) def on_compile_error(self, packet): logger.info( diff --git a/judge/forms.py b/judge/forms.py index dd17bb4..5168240 100644 --- a/judge/forms.py +++ b/judge/forms.py @@ -119,9 +119,9 @@ class ProfileForm(ModelForm): def file_size_validator(file): - limit = 10 * 1024 * 1024 + limit = 1 * 1024 * 1024 if file.size > limit: - raise ValidationError("File too large. Size should not exceed 10MB.") + raise ValidationError("File too large. Size should not exceed 1MB.") class ProblemSubmitForm(ModelForm):