Skip to content

Commit

Permalink
fix(*): Downgrade to Celery 4.4.6
Browse files Browse the repository at this point in the history
Celery v4.4.7 introduced a regression in setting of configuration options which still seems to exist in v5.0.0.

See celery/celery#6285 and others.
  • Loading branch information
nokome committed Oct 13, 2020
1 parent ed102ce commit c75c2bb
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 20 deletions.
4 changes: 2 additions & 2 deletions manager/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
amqp==5.0.1
amqp==2.6.1
brotli==1.0.9
celery==5.0.0
celery==4.4.6
customidenticon==0.1.5
dj_database_url==0.5.0
dj-stripe==2.3.0
Expand Down
4 changes: 2 additions & 2 deletions overseer/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
amqp==5.0.1
celery==5.0.0
amqp==2.6.1
celery==4.4.6
httpx==0.16.1
prometheus_client==0.8.0
4 changes: 2 additions & 2 deletions scheduler/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
amqp==5.0.1
celery==5.0.0
amqp==2.6.1
celery==4.4.6
django-celery-beat==2.0.0
dj-database-url==0.5.0
psycopg2-binary==2.8.6
6 changes: 1 addition & 5 deletions worker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,4 @@ USER worker

# Use the array form of CMD to ensure that the celery process has PID 1
# so that it will receive SIGTERM for graceful shutdown
CMD ["celery", "--app=worker", "worker", \
"--events", \
"--heartbeat-interval=60", \
"--prefetch-multiplier=1", \
"--concurrency=10" ]
CMD ["celery", "--app=worker", "worker", "--heartbeat-interval=60"]
6 changes: 1 addition & 5 deletions worker/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,11 @@ run: venv
BROKER_URL=amqp://stencila:password@localhost:5672/stencila \
CACHE_URL=redis://stencila:password@localhost:6379/0 \
WORKER_CONCURRENCY=3 \
$(VE)/celery \
--app worker \
worker \
--events \
$(VE)/celery --app=worker worker \
--loglevel DEBUG \
--hostname worker-$$(date +'%s')@%h \
--heartbeat-interval 60


# Build Docker image
build:
docker build --tag stencila/hub-worker .
Expand Down
4 changes: 2 additions & 2 deletions worker/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
amqp==5.0.1
celery==5.0.0
amqp==2.6.1
celery==4.4.6
google-api-python-client==1.12.3
kubernetes==11.0.0
lxml==4.5.2
Expand Down
2 changes: 0 additions & 2 deletions worker/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@
"worker", broker=os.environ["BROKER_URL"], backend=os.environ["CACHE_URL"],
)
app.conf.update(
# In Celery 5.0 it appear necessary to also set (some of?) these options
# in the command line invocation
# List of queues to subscribe to
task_queues=[
Queue(queue, exchange=queue, routing_key=queue)
Expand Down

0 comments on commit c75c2bb

Please sign in to comment.