Commit e4063248 by Bach Dániel

fix celery hostname

parent 038a99f2
from celery.apps.worker import Worker from celery.apps.worker import Worker
from twisted.internet import reactor, inotify from twisted.internet import reactor, inotify
from twisted.python import filepath from twisted.python import filepath
from agentcelery import celery from agentcelery import celery, HOSTNAME
from protocol import inotify_handler from protocol import inotify_handler
from os import getenv, listdir, path from os import getenv, listdir, path
import logging import logging
...@@ -32,6 +32,7 @@ def reactor_stopped(worker): ...@@ -32,6 +32,7 @@ def reactor_stopped(worker):
def main(): def main():
w = Worker(app=celery, concurrency=1, w = Worker(app=celery, concurrency=1,
pool_cls='threads', pool_cls='threads',
hostname=HOSTNAME + '.agentdriver',
loglevel=logging.DEBUG) loglevel=logging.DEBUG)
reactor.callInThread(w.run) reactor.callInThread(w.run)
notifier = inotify.INotify(reactor) notifier = inotify.INotify(reactor)
......
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