@ -13,7 +13,7 @@ import time
logger = logging.getLogger('WORKER')
class Worker(object):
class AnalyticUnitWorker(object):
models_cache = {}
thread = None
queue = queue.Queue()
@ -85,7 +85,7 @@ class Worker(object):
}
else:
result = self.do_predict(analytic_unit_id, last_prediction_time, pattern)
result['task'] = 'learn'
return result
@ -4,7 +4,7 @@ import logging
import zmq
import sys
from worker import Worker
from worker import AnalyticUnitWorker
root = logging.getLogger()
@ -46,7 +46,7 @@ def handle_task(text):
if __name__ == "__main__":
worker = Worker()
worker = AnalyticUnitWorker()
logger.info("Worker was started")
logger.info("Binding to %s ..." % config.ZEROMQ_CONNECTION_STRING)