mher / flower

Real-time monitor and web admin for Celery distributed task queue
https://flower.readthedocs.io
Other
6.27k stars 1.07k forks source link

amqps:// scheme in Broker URL breaks Broker Tab #1369

Open DrMeers opened 2 months ago

DrMeers commented 2 months ago

Running flower via celery --broker=amqps://... (as provided by CloudAMQP plugin on Heroku, for example) means when you check the Broker tab in the Flower dashboard you just see the error message 'amqp' broker is not supported which is confusing to say the least:

Screenshot 2024-04-12 at 20 45 28

It seems that simply adding a check for amqps in utils/broker.py would allow this to work correctly; currently it raises NotImplementedError

if scheme == 'amqp':
    return RabbitMQ(broker_url, *args, **kwargs)
elif scheme == 'redis':
    return Redis(broker_url, *args, **kwargs)
elif scheme == 'rediss':
    return RedisSsl(broker_url, *args, **kwargs)
elif scheme == 'redis+socket':
    return RedisSocket(broker_url, *args, **kwargs)
elif scheme == 'sentinel':
    return RedisSentinel(broker_url, *args, **kwargs)
else:
    raise NotImplementedError

As far as I can see, the same RabbitMQ class should suffice and already seems to support https?

7C-habib commented 2 months ago

@DrMeers any update as to when this will be merged in master.

EwertonDCSilv commented 2 months ago

@mher alguma novidade sobre o tema ? Tenho o mesmo problema usando o RabbitMQ

EwertonDCSilv commented 2 months ago

Segue o docker-compose.yaml que defini:

  celery_flower:
    container_name: "celery_flower"
    environment:
      - PYTHONPATH=/app
      - CELERY_BROKER_URL=amqps://guest:guest@rabbitmq:5672/vhost
      - CELERY_RESULT_BACKEND=redis://redis:6379/0
      - FLOWER_PORT=8888
    image: mher/flower:latest
    volumes:
      - .:/app
    command: celery flower --port=8888
    ports:
      - 8888:8888
the-witch-king commented 1 month ago

Is there any update on this?