Skip to content

Commit

Permalink
Fix flower broker configuration
Browse files Browse the repository at this point in the history
In case the celery broker is configured with transport options, these
options would not be passed into flower with a --broker parameter.

So now we pass the whole celery app to flower instead.

Also, don't try to start Flower if no Celery broker URL present.
  • Loading branch information
leorochael committed Mar 20, 2018
1 parent 97afcd5 commit b1f8b34
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions superset/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,10 +309,18 @@ def flower(port, address):
Celery Flower is a UI to monitor the Celery operation on a given
broker"""
BROKER_URL = celery_app.conf.BROKER_URL
if not celery_app.conf.BROKER_URL:
print(
Fore.YELLOW +
'No Celery broker found in your superset configuration.\n'
'Please provide a CELERY_CONFIG setting, including a BROKER_URL.\n'
'Not starting Celery Flower.' +
Style.RESET_ALL,
)
return
cmd = (
'celery flower '
'--broker={BROKER_URL} '
'-A superset.cli.celery_app '
'--port={port} '
'--address={address} '
).format(**locals())
Expand Down

0 comments on commit b1f8b34

Please sign in to comment.