Bridge: only update necessary problems when judge sends update signal
This commit is contained in:
parent
4ee2e1b940
commit
04f9fe8252
3 changed files with 72 additions and 21 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue