Цветочная панель не отображается
Мы используем Django для нашего сайта Python. Мы используем celery==4.1.1
запускать фоновые задачи. Все работает отлично. Но я не могу следить за обработанными или обрабатываемыми задачами, как мы привыкли иметь в старом сельдерее с djcelery
, Я слышал о flower
,
я использовал
flower==0.9.2
tornado==4.5.2
babel==2.5.3
Вот команда в Супервизоре:
[program:celery-flower]
command=flower -A lbb --natural-time --url_prefix=flower --port=5555 --inspect --enable-events
Вот моя конфигурация Nginx:
upstream application {
server lbb-app:8000;
}
upstream application2 {
server lbb-app:5555;
}
server {
listen 80 default_server;
charset utf-8;
client_max_body_size 4G; # adjust to taste
server_tokens off;
add_header X-Content-Type-Options nosniff;
add_header X-XSS-Protection "1; mode=block";
add_header Cache-Control "no-store";
add_header Pragma "no-cache";
add_header Strict-Transport-Security "max-age=31536000; includeSubdomains;";
location /work {
include uwsgi_params;
uwsgi_pass application;
}
# Finally, send all non-media requests to the Django server.
location / {
include uwsgi_params;
uwsgi_pass application;
}
location /flower/ {
include uwsgi_params;
uwsgi_pass application2;
}
}
Я не могу открыть приборную панель. Это показывает 504 ошибку.
Вот бревна из сельдерея-цветка-стдерра.
[I 180605 08:25:06 command:106] Visit me at http://localhost:5555
[I 180605 08:25:06 command:107] Broker: amqp://guest:**@ec2-xx-2xx-1xx-xx.eu-west-1.compute.amazonaws.com:5672//
[W 180605 08:25:06 state:74] Broker info is not available if --broker_api option is not configured. Also make sure RabbitMQ Management Plugin is enabled (rabbitmq-plugins enable rabbitmq_management)
[I 180605 08:25:06 mixins:224] Connected to amqp://guest:**@ec2-xx-2xx-1xx-xx.eu-west-1.compute.amazonaws.com:5672//
Является --broker-api
обязательно показывать цветочную приборную панель? Есть ли проблема в моих настройках? Что я должен делать? Я подозреваю, что это связано с моим nginx conf. Пожалуйста, укажите на что-то не так.
отредактированный
Я добавил broker-api=http://guest:**@ec2-xx-2xx-1xx-xx.eu-west-1.compute.amazonaws.com:15672/api/
и команда управления rabbitmq.
Теперь сообщение в сельдерее-цветке-stderr:
[I 180606 03:56:15 command:139] Visit me at http://localhost:5555
[I 180606 03:56:15 command:144] Broker: amqp://guest:**@ec2-xx-2xx-1xx-xx.eu-west-1.compute.amazonaws.com:5672//
[I 180606 03:56:15 command:147] Registered tasks:
['(redacted)',
'celery.accumulate',
'celery.backend_cleanup',
'celery.chain',
'celery.chord',
'celery.chord_unlock',
'celery.chunks',
'celery.group',
'celery.map',
'celery.starmap',
'celery_haystack.tasks.CeleryHaystackSignalHandler',
'celery_haystack.tasks.CeleryHaystackUpdateIndex',]
[I 180606 03:56:15 mixins:224] Connected to amqp://guest:**@ec2-xx-2xx-1xx-xx.eu-west-1.compute.amazonaws.com:5672//
[W 180606 03:56:17 control:44] 'stats' inspect method failed
[W 180606 03:56:17 control:44] 'active_queues' inspect method failed
[W 180606 03:56:17 control:44] 'registered' inspect method failed
[W 180606 03:56:17 control:44] 'scheduled' inspect method failed
[W 180606 03:56:17 control:44] 'active' inspect method failed
[W 180606 03:56:17 control:44] 'reserved' inspect method failed
[W 180606 03:56:17 control:44] 'revoked' inspect method failed
[W 180606 03:56:17 control:44] 'conf' inspect method failed