Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docker-compose-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ services:
redis:
image: redis:latest
ports:
- "6379:6379"
- "6355:6379"


# Used for formatting the volume as ext4. Otherwise, some minio operations may fail.
Expand Down
10 changes: 10 additions & 0 deletions rainfall/celeryconfig.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import os

broker_url = os.environ['REDIS_URL'],
result_backend = os.environ['REDIS_URL']
# Don't use a pool, connect every time. There seems to be an issue with
# connections to Redis getting stale.
broker_pool_limit = None
# Retry forever if Redis is unreachable.
broker_connection_max_retries = None
broker_connection_retry_on_startup = True
5 changes: 2 additions & 3 deletions rainfall/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@
log = logging.getLogger(__name__)
logging.basicConfig(level=logging.DEBUG)

task_app = Celery('tasks',
broker_url=os.environ['REDIS_URL'],
result_backend=os.environ['REDIS_URL'])
task_app = Celery('tasks')
task_app.config_from_object('rainfall.celeryconfig')


@task_app.task
Expand Down
Loading