Commit 9aac4f3f by Guba Sándor

node: replaced Exception to WorkerNotFound

parent 437844f1
......@@ -11,7 +11,7 @@ from celery.exceptions import TimeoutError
from model_utils.models import TimeStampedModel
from taggit.managers import TaggableManager
from common.models import method_cache
from common.models import method_cache, WorkerNotFound
from firewall.models import Host
from ..tasks import vm_tasks
from .common import Trait
......@@ -117,7 +117,7 @@ class Node(TimeStampedModel):
if vm_tasks.check_queue(, queue_id):
return + "." + queue_id
raise Exception("Worker not found.")
raise WorkerNotFound()
def remote_query(self, task, timeout=30, raise_=False, default=None):
"""Query the given task, and get the result.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment