fix
This commit is contained in:
parent
fe6bf5df43
commit
e4de414799
@ -1,3 +1,6 @@
|
|||||||
|
from os.path import join, exists
|
||||||
|
from shutil import rmtree
|
||||||
|
|
||||||
import pika
|
import pika
|
||||||
from django.core.management.base import BaseCommand
|
from django.core.management.base import BaseCommand
|
||||||
|
|
||||||
@ -27,6 +30,10 @@ class Command(BaseCommand):
|
|||||||
print(e)
|
print(e)
|
||||||
solution.result = "TE"
|
solution.result = "TE"
|
||||||
solution.save()
|
solution.save()
|
||||||
|
finally:
|
||||||
|
path = join("solutions", str(id))
|
||||||
|
if exists(path):
|
||||||
|
rmtree(path)
|
||||||
|
|
||||||
channel.basic_consume(queue="test", on_message_callback=callback, auto_ack=True)
|
channel.basic_consume(queue="test", on_message_callback=callback, auto_ack=True)
|
||||||
channel.start_consuming()
|
channel.start_consuming()
|
||||||
|
@ -91,6 +91,8 @@ class BaseTester:
|
|||||||
join("solutions/" + str(self.solution.id), file.filename), "wb"
|
join("solutions/" + str(self.solution.id), file.filename), "wb"
|
||||||
) as fs:
|
) as fs:
|
||||||
fs.write(get_bytes(file.fs_id))
|
fs.write(get_bytes(file.fs_id))
|
||||||
|
for file in listdir("solutions/" + str(self.solution.id)):
|
||||||
|
call("chmod 777 " + "solutions/" + str(self.solution.id) + "/" + file)
|
||||||
print("Files copied")
|
print("Files copied")
|
||||||
try:
|
try:
|
||||||
self.before_test()
|
self.before_test()
|
||||||
|
Loading…
Reference in New Issue
Block a user