from remotecv import pyres_tasks
from remotecv.unique_queue import UniqueQueue

from thumbor.detectors import BaseDetector

class QueuedDetector(BaseDetector):
    queue = UniqueQueue()

    def detect(self, callback):
        engine = self.context.modules.engine
        self.queue.enqueue_unique(pyres_tasks.DetectTask,
                args=[self.detection_type, self.context.request.image_url],
                key=self.context.request.image_url)
        self.context.prevent_result_storage = True
        callback([])

@@ -1,37 +1,4 @@
-from remotecv import pyres_tasks%0A
 from
@@ -257,17 +257,39 @@
 e_unique
-(
+_from_string('remotecv.
 pyres_ta
@@ -302,16 +302,27 @@
 tectTask
+', 'Detect'
 ,%0A      

Remove dependency from remotecv worker on queued detector