novacode-nl / odoo-celery

Odoo & Celery integration
GNU Lesser General Public License v3.0
42 stars 44 forks source link

How to configure the broker URL? #39

Closed oadiazp closed 2 years ago

oadiazp commented 2 years ago

Hi:

I'm looking inside of your code and I can't see the way I can pass the BROKER_URL and in your example isn't clear. How do you recommend to do it?

Regards Omar

bobslee commented 2 years ago

Hi @oadiazp Please explain more detailed. Some reference to code please.

ruter commented 2 years ago

Hi @bobslee

As celery documentation mention, there is the broker keyword argument, specifying the URL of the message broker you want to use.

app = Celery('tasks', broker='pyamqp://guest@localhost//')

But the code below, can't specify the broker URL, maybe there should be an environment variable called celery_broker or something else, used to configure the broker URL.

https://github.com/novacode-nl/odoo-celery/blob/81fea36e943630f7fca3ac087ced89ffe3ff0df4/celery/odoo.py#L35

bobslee commented 2 years ago

Hi @ruter , @oadiazp

By coincidence there's a PR (odoo 11.0) which addresses this, https://github.com/novacode-nl/odoo-celery/pull/40

Please checkout the the changeset (code). We still need to document and merge.

bobslee commented 2 years ago

@ruter , @oadiazp see also the PR #41 for Odoo v13. I close this issue now.