import redis
from celery import Celery

from .driller import Driller

app = Celery('tasks', broker='amqp://guest@localhost//', backend='redis://localhost')
redis_pool = redis.ConnectionPool(host='localhost', port=6379, db=1)

@app.task
def drill(binary, input, fuzz_bitmap, qemu_dir):
    redis_inst = redis.Redis(connection_pool=redis_pool)

    driller = Driller(binary, input, fuzz_bitmap, qemu_dir, redis=redis_inst)
    return driller.drill()

@@ -66,162 +66,263 @@
 ler%0A
-%0Aapp = Celery('tasks', broker='amqp://guest@localhost//', backend='redis://localhost')%0Aredis_pool = redis.ConnectionPool(host='localhost', port=6379, db=1
+import config%0A%0Abackend_url = %22redis://%25s:%25d%22 %25 (config.REDIS_HOST, config.REDIS_PORT)%0Aapp = Celery('tasks', broker=config.BROKER_URL, backend=backend_url)%0Aredis_pool = redis.ConnectionPool(host=config.REDIS_HOST, port=config.REDIS_PORT, db=config.REDIS_DB
 )%0A%0A@

Connect to Celery using config options