Skip to content

Commit

Permalink
(SIO-1877) Fix submitsqueue losing track of job IDs
Browse files Browse the repository at this point in the history
Use `postpone` instead of `evalmgr_job.delay` in receive_from_workers
for adding env back into evalmgr queue, like Zeus does.

This way, the postpone handler of submitsqueue will be run,
and it will know the new celery task id.

Change-Id: I737d864f5be165dcd68c2c990d34662d01ccfabf
  • Loading branch information
Wojciech Dubiel authored and Gerrit Code Review committed Mar 5, 2017
1 parent 80851f9 commit 8bdf2c0
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from django.conf import settings
from django.core.management.base import BaseCommand
import oioioi
import oioioi.evalmgr.handlers
import BaseHTTPServer
import SocketServer
import logging
Expand Down Expand Up @@ -29,7 +30,12 @@ def do_POST(self):
if 'workers_jobs.extra_args' in env:
del env['workers_jobs.extra_args']
assert 'workers_jobs.results' in env or 'error' in env
oioioi.evalmgr.evalmgr_job.delay(env)

# HACKHACK: Temporary fix for SIO-1877 - call postpone instead of
# evalmgr_job, see discussion:
# https://groups.google.com/forum/#!topic/sio2-project/PrFjPMawMP0
oioioi.evalmgr.handlers.postpone(env)

self.send_response(200, 'OK')
self.send_header('Content-type', 'text/plain')
self.end_headers()
Expand Down

0 comments on commit 8bdf2c0

Please sign in to comment.