retest
This commit is contained in:
@@ -5,6 +5,7 @@ from django.contrib.auth.models import User
|
||||
from django.core.management import BaseCommand
|
||||
import psycopg2
|
||||
import django.db
|
||||
import django.db.utils
|
||||
from pika.adapters.utils.connection_workflow import AMQPConnectorException
|
||||
|
||||
from Sprint import settings
|
||||
@@ -35,7 +36,7 @@ class MessagingSupport(BaseCommand):
|
||||
try:
|
||||
self.process(data)
|
||||
print("Process finished successfully")
|
||||
except (psycopg2.OperationalError, django.db.OperationalError):
|
||||
except (psycopg2.OperationalError, django.db.OperationalError, django.db.utils.OperationalError):
|
||||
print("Failed to connect to database, restarting...")
|
||||
send_to_queue(self.queue_name, data)
|
||||
raise
|
||||
|
@@ -6,6 +6,7 @@ from django.core.management import BaseCommand
|
||||
from requests import get, post
|
||||
|
||||
from Sprint import settings
|
||||
from SprintLib.queue import send_to_queue
|
||||
|
||||
|
||||
def write_bytes(data: bytes):
|
||||
@@ -67,3 +68,9 @@ class LoopWorker(BaseCommand):
|
||||
while True:
|
||||
self.go()
|
||||
sleep(self.sleep_period)
|
||||
|
||||
|
||||
def send_testing(solution):
|
||||
if solution.set is not None and len(solution.set.checkers.all()) != 0:
|
||||
return
|
||||
send_to_queue("test", {"id": solution.id})
|
||||
|
Reference in New Issue
Block a user