sleep at transaction
This commit is contained in:
parent
a1c268ded1
commit
72260dc90f
@ -1,3 +1,5 @@
|
|||||||
|
from time import sleep
|
||||||
|
|
||||||
import pika
|
import pika
|
||||||
from django.core.management.base import BaseCommand
|
from django.core.management.base import BaseCommand
|
||||||
|
|
||||||
@ -19,11 +21,12 @@ class Command(BaseCommand):
|
|||||||
try:
|
try:
|
||||||
id = int(str(body, encoding='utf-8'))
|
id = int(str(body, encoding='utf-8'))
|
||||||
print(f"Received id {id}")
|
print(f"Received id {id}")
|
||||||
solution = Solution.objects.get(id=id)
|
while True:
|
||||||
except Exception as e:
|
try:
|
||||||
print(e)
|
solution = Solution.objects.get(id=id)
|
||||||
return
|
break
|
||||||
try:
|
except:
|
||||||
|
sleep(.5)
|
||||||
eval(solution.language.work_name + 'Tester')(solution).execute()
|
eval(solution.language.work_name + 'Tester')(solution).execute()
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(e)
|
print(e)
|
||||||
|
Loading…
Reference in New Issue
Block a user