Compare commits
2 commits
2d537e93f8
...
ac96bbff64
Author | SHA1 | Date | |
---|---|---|---|
|
ac96bbff64 | ||
|
cd1ede252f |
2 changed files with 8 additions and 1 deletions
|
@ -326,7 +326,8 @@ class CentralManagement():
|
|||
sqsHit = self.currentHit
|
||||
updateStatus = True
|
||||
|
||||
sqsAssignment = sqsHit.getAssignmentById(signal.params['event']['AssignmentId'])
|
||||
assId = signal.params['event']['AssignmentId'] + '_' + signal.params['event']['WorkerId']
|
||||
sqsAssignment = sqsHit.getAssignmentById(assId)
|
||||
if not sqsAssignment:
|
||||
self.logger.critical(f"Invalid assignmentId given for hit: {signal.params['event']}")
|
||||
continue
|
||||
|
|
|
@ -75,7 +75,10 @@ class WebSocketHandler(tornado.websocket.WebSocketHandler):
|
|||
|
||||
self.hit = self.store.currentHit
|
||||
|
||||
# my core assumption about assignment_id was wrong. It is not unique per worker, so we need to merge those
|
||||
self.assignment_id = str(self.get_query_argument('assignmentId'))
|
||||
self.assignment_id += '_' + str(self.get_query_argument('workerId'))
|
||||
|
||||
self.assignment = self.hit.getLastAssignment()
|
||||
|
||||
if self.assignment.assignment_id != self.assignment_id:
|
||||
|
@ -317,6 +320,9 @@ class DrawPageHandler(tornado.web.RequestHandler):
|
|||
return
|
||||
|
||||
assignmentId = self.get_query_argument('assignmentId', '')
|
||||
if len(assignmentId):
|
||||
assignmentId += '_' + str(self.get_query_argument('workerId', ''))
|
||||
|
||||
if len(assignmentId) < 1:
|
||||
logger.critical("Accessing page without assignment id. Allowing it for debug purposes... fingers crossed?")
|
||||
|
||||
|
|
Loading…
Reference in a new issue