Fix a bug where the broker URL state could be stale.

Review Request #12383 — Created June 17, 2022 and submitted

Information

ReviewBot
release-3.0.x

Reviewers

Newer versions of Celery cache the broker URL. This was preventing any
new URL changes from taking effect until the web server was restarted.

We now lazily-construct the Celery instance when we request it, and we
invalidate the instance if the broker URL has changed.

Switched back-and-forth between valid and invalid broker URLs. Saw that
the worker status only returned successful results when using the valid
broker URL, rather than fetching from whatever URL was used in the first
request.

Summary ID
Fix a bug where the broker URL state could be stale.
Newer versions of Celery cache the broker URL. This was preventing any new URL changes from taking effect until the web server was restarted. We now lazily-construct the Celery instance when we request it, and we invalidate the instance if the broker URL has changed.
9049fccf7205ff5834928607b3e2e83aef9fe1a6
david
  1. Ship It!
  2. 
      
chipx86
Review request changed
Status:
Completed
Change Summary:
Pushed to release-3.0.x (230ac47)