Skip to content

fix(py): Specify celery memory broker broker url correctly.#19842

Merged
wedamija merged 1 commit into
masterfrom
danf/py3_celery4_fix_test_mem_backend
Jul 13, 2020
Merged

fix(py): Specify celery memory broker broker url correctly.#19842
wedamija merged 1 commit into
masterfrom
danf/py3_celery4_fix_test_mem_backend

Conversation

@wedamija

Copy link
Copy Markdown
Member

In Celery 3.x it seems fine to just specify the memory backend and set BROKER_URL=None. In
Celery 4.x this ends up defaulting to a url like amqp:..., which causes a failure when we attempt
to flush the queue after each test. Luckily, all we need to do is specify the url like memory://
and it is correctly picked up again.

This change works fine in both Celery 3.x and 4.x

In Celery 3.x it seems fine to just specify the `memory` backend and set `BROKER_URL=None`. In
Celery 4.x this ends up defaulting to a url like `amqp:...`, which causes a failure when we attempt
to flush the queue after each test. Luckily, all we need to do is specify the url like `memory://`
and it is correctly picked up again.
@wedamija wedamija requested a review from a team July 13, 2020 21:15

@BYK BYK left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🥇

@wedamija wedamija merged commit 8035567 into master Jul 13, 2020
@wedamija wedamija deleted the danf/py3_celery4_fix_test_mem_backend branch July 13, 2020 22:09
@github-actions github-actions Bot locked and limited conversation to collaborators Dec 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants