Bridge: only update necessary problems when judge sends update signal

This commit is contained in:
cuom1999 2024-05-03 13:37:19 -05:00
parent 4ee2e1b940
commit 04f9fe8252
3 changed files with 72 additions and 21 deletions

View file

@ -4,6 +4,7 @@ import os
import re
import yaml
import zipfile
import shutil
from django.conf import settings
from django.core.files.base import ContentFile
@ -48,6 +49,10 @@ class ProblemDataStorage(FileSystemStorage):
def rename(self, old, new):
return os.rename(self.path(old), self.path(new))
def delete_directory(self, name):
directory_path = self.path(name)
shutil.rmtree(directory_path)
class ProblemDataError(Exception):
def __init__(self, message):