randalee opened a new issue #16562: URL: https://github.com/apache/superset/issues/16562
I tried to run celerybeat and celery worker in the background for alarm and report functionality. I tried using init script with reference to "https://docs.celeryproject.org/en/v4.4.7/userguide/daemonizing.html". However, those scripts that use "multi start" do not use superset app config. ### Expected results Normal background execution. celerybeat - success celery worker - error ### Actual results As a result of checking the log, the log accessing ampq instead of the redis. #### Screenshots foreground - OK  backgroud - Fail  #### How to reproduce the bug **foreground** celery worker --app=superset.tasks.celery_app:app --pool=prefork -O fair -c 4 **background** celery multi start worker --app=superset.tasks.celery_app:app --pool=prefork -O fair -c 4 --logfile='log' tail -f log ### Environment (please complete the following information): superset 1.3.0 python 3.9.6 celery 4.4.7 (cliffs) any feature flags & celery setting ``` FEATURE_FLAGS = { "ENABLE_TEMPLATE_PROCESSING": True, "ENABLE_TEMPLATE_REMOVE_FILTERS": True, "ALERT_REPORTS": True, "DASHBOARD_NATIVE_FILTERS": True, "DASHBOARD_CROSS_FILTERS": True, "DASHBOARD_NATIVE_FILTERS_SET": True } class CeleryConfig(object): BROKER_URL = 'redis://localhost:6379/0' CELERY_IMPORTS = ( 'superset.sql_lab', 'superset.tasks', 'superset.tasks.thumbnails' ) CELERY_RESULT_BACKEND = 'redis://localhost:6379/0' CELERYD_LOG_LEVEL = 'DEBUG' CELERYD_PREFETCH_MULTIPLIER = 10 CELERY_ACKS_LATE = True CELERY_ANNOTATIONS = { 'sql_lab.get_sql_results': { 'rate_limit': '100/s', }, 'email_reports.send': { 'rate_limit': '1/s', 'time_limit': 120, 'soft_time_limit': 150, 'ignore_result': True, }, } CELERYBEAT_SCHEDULE = { 'email_reports.schedule_hourly': { 'task': 'email_reports.schedule_hourly', 'schedule': crontab(minute=1, hour='*'), }, 'reports.scheduler': { 'task': 'reports.scheduler', 'schedule': crontab(minute='*', hour='*'), }, 'reports.prune_log': { 'task': 'reports.prune_log', 'schedule': crontab(minute=0, hour=0), }, 'alerts.schedule_check': { 'task': 'alerts.schedule_check', 'schedule': crontab(minute='*', hour='*'), }, } CELERY_CONFIG = CeleryConfig ``` ### Checklist Make sure to follow these steps before submitting your issue - thank you! - [v] I have checked the superset logs for python stacktraces and included it here as text if there are any. - [v] I have reproduced the issue with at least the latest released version of superset. - [v] I have checked the issue tracker for the same issue and I haven't found one similar. ### Additional context -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
