## This file is the celeryconfig for the Task Worker (scanworker). from scanworker.commonconfig import * import sys sys.path.append('.') BROKER_CONF = { 'uid': '{{ mq_user }}', 'pass': '******', 'host': '{{ mq_host }}', 'port': '5672', 'vhost': '{{ mq_vhost }}', } BROKER_URL = 'amqp://' + BROKER_CONF['uid'] + ':' + BROKER_CONF[ 'pass'] + '@' + BROKER_CONF['host'] + ':' + BROKER_CONF[ 'port'] + '/' + BROKER_CONF['vhost'] BROKER_HEARTBEAT = True CELERY_IMPORTS = ('scanworker.tasks', ) from scanworker.tasks import VALID_SCANNERS as vs VALID_SCANNERS = vs() CELERY_QUEUES = VALID_SCANNERS.celery_virus_scan_queues() CELERY_ROUTES = VALID_SCANNERS.celery_virus_scan_routes()
## This file is the celeryconfig for the Task Result Handler on scanmaster. import sys sys.path.append('.') import djcelery djcelery.setup_loader() from scaggr.settings import * CELERY_IMPORTS = ('scanworker.result',) from scanworker.result import get_result_saver_queues from scanworker.tasks import VALID_SCANNERS as vs VALID_SCANNERS = vs() CELERY_QUEUES = get_result_saver_queues()