docker cleaner
This commit is contained in:
parent
0f38429ed9
commit
bd8eef9325
@ -109,6 +109,7 @@ class BaseTester:
|
||||
def cleanup(self):
|
||||
self.solution.save()
|
||||
send_to_queue("cleaner", {"type": "container", "name": f"solution_{self.solution.id}"})
|
||||
if self.checker_code:
|
||||
send_to_queue("cleaner", {"type": "container", "name": f"solution_{self.solution.id}_checker"})
|
||||
for file in self.solution.task.dockerfiles:
|
||||
add_name = file.filename[11:]
|
||||
|
@ -1,6 +1,6 @@
|
||||
from subprocess import call
|
||||
|
||||
from SprintLib.queue import MessagingSupport
|
||||
from SprintLib.queue import MessagingSupport, send_to_queue
|
||||
|
||||
|
||||
class Command(MessagingSupport):
|
||||
@ -30,3 +30,4 @@ class Command(MessagingSupport):
|
||||
print(f"Removed {type} {name}")
|
||||
else:
|
||||
print("Something went wrong")
|
||||
send_to_queue(self.queue_name, payload)
|
||||
|
@ -258,8 +258,7 @@ services:
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
deploy:
|
||||
mode: replicated
|
||||
replicas: 1
|
||||
mode: global
|
||||
restart_policy:
|
||||
condition: any
|
||||
update_config:
|
||||
|
Loading…
Reference in New Issue
Block a user