Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

Commit

Permalink
Update redis connection for docker compose
Browse files Browse the repository at this point in the history
  • Loading branch information
ms-christensen committed Aug 25, 2019
1 parent 245a7e3 commit b4ec19c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,15 @@

lbp_config.cache_dir = "cache"

q = Queue(connection=Redis())
redis_connection = Redis(host="redis")

q = Queue(connection=redis_connection)


def handle_job(resource_value: str, resource_type: str) -> dict:
try:
logger.debug(f"Checking for job with the id {resource_value}")
job = Job.fetch(resource_value, connection=Redis())
job = Job.fetch(resource_value, connection=redis_connection)
except NoSuchJobError:
logger.debug(f"No existing job. Starting one up ...")
job = q.enqueue(
Expand Down

0 comments on commit b4ec19c

Please sign in to comment.