File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -674,8 +674,10 @@ def cancel(self, status=CANCELLED):
674674 sub .cancel (status = status )
675675 celery_app = app
676676 # If a custom queue is set, we need to fetch the appropriate celery app
677- if self .phase .competition .queue :
678- celery_app = app_for_vhost (str (self .phase .competition .queue .vhost ))
677+ # NOTE: We fetch the queue from submission and not from competition to be sure that we are using the correct queue
678+ # Originally we were using queue from the competition (self.phase.competition.queue)
679+ if self .queue :
680+ celery_app = app_for_vhost (str (self .queue .vhost ))
679681 # We need to convert the UUID given by celery into a byte like object otherwise it won't work
680682 celery_app .control .revoke (str (self .celery_task_id ), terminate = True )
681683 self .status = status
You can’t perform that action at this time.
0 commit comments