You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is it possible to implement celery priorities options with celery-director?
Redis or RabbitMQ broker, it doesn't matter, I tried with both but I failed to set them up.
I faced up error when building my newer project docker image:
=> ERROR [10/10] RUN director dlassets 2.2s
------
> [10/10] RUN director dlassets:
2.061 Traceback (most recent call last):
2.061 File "/usr/local/bin/director", line 8, in <module>
2.061 sys.exit(cli())
2.061 File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1157, in __call__
2.062 return self.main(*args, **kwargs)
2.062 File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1078, in main
2.062 rv = self.invoke(ctx)
2.062 File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1688, in invoke
2.062 return _process_result(sub_ctx.command.invoke(sub_ctx))
2.062 File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1434, in invoke
2.063 return ctx.invoke(self.callback, **ctx.params)
2.063 File "/usr/local/lib/python3.10/site-packages/click/core.py", line 783, in invoke
2.063 return __callback(*args, **kwargs)
2.063 File "/usr/local/lib/python3.10/site-packages/click/decorators.py", line 81, in new_func
2.063 obj = ctx.ensure_object(object_type)
2.063 File "/usr/local/lib/python3.10/site-packages/click/core.py", line 643, in ensure_object
2.063 self.obj = rv = object_type()
2.063 File "/usr/local/lib/python3.10/site-packages/director/context.py", line 10, in __init__
2.063 self.app = create_app()
2.063 File "/usr/local/lib/python3.10/site-packages/director/__init__.py", line 80, in create_app
2.063 cel.init_app(app)
2.063 File "/usr/local/lib/python3.10/site-packages/director/extensions.py", line 102, in init_app
2.064 self.conf.update(app.config.get("CELERY_CONF", {}))
2.064 File "/usr/local/lib/python3.10/site-packages/celery/utils/collections.py", line 302, in update
2.064 result = self.changes.update(*args, **kwargs)
2.064 File "/usr/local/lib/python3.10/site-packages/celery/app/base.py", line 119, in update
2.064 self._data.update(*args, **kwargs)
2.064 ValueError: dictionary update sequence element #0 has length 4; 2 is required
------
Dockerfile:40
--------------------
38 | RUN mkdir -p ./workflows/static
39 | RUN chown director:director workflows/static
40 | >>> RUN director dlassets
41 |
42 | USER director
--------------------
ERROR: failed to solve: process "/bin/sh -c director dlassets" did not complete successfully: exit code: 1
2. Also tried to implement custom conf using .env file:
Hello,
Is it possible to implement celery priorities options with celery-director?
Redis or RabbitMQ broker, it doesn't matter, I tried with both but I failed to set them up.
docker-compose.yml file:
Note:
workflows.yml
withlowpriority
queue.lowpriority:3
: failed resultworkflows.yml
usingpriority
field: failed resultRedis (based on https://docs.celeryq.dev/en/latest/userguide/routing.html#redis-message-priorities):
1. As
broker_transport_options
conf is hard coded indirector.settings
, I built new celery-director python package with following customCELERY_CONF
:I faced up error when building my newer project docker image:
2. Also tried to implement custom conf using
.env
file:and
But it does not overwrite hard coded
broker_transport_options
:Result:
3. Same result as before when I tried to implement custom
DIRECTOR_BROKER_TRANSPORT_OPTIONS
conf withENV
inDockerfile
4. Same result as before when I tried to dynamically set custom conf using celery
apply_async()
Updated task:
RabbitMQ (based on https://docs.celeryq.dev/en/latest/userguide/routing.html#rabbitmq-message-priorities):
5. Tried to implement custom conf using
.env
file:But as previous results, it does not overwrite hard coded
broker_transport_options
Any help would be appreciate,
Many thanks
The text was updated successfully, but these errors were encountered: