| 73 | |
| 74 | |
| 75 | class CeleryConfig: |
| 76 | broker_url = f"redis://{REDIS_HOST}:{REDIS_PORT}/{REDIS_CELERY_DB}" |
| 77 | imports = ( |
| 78 | "superset.sql_lab", |
| 79 | "superset.tasks.scheduler", |
| 80 | "superset.tasks.thumbnails", |
| 81 | "superset.tasks.cache", |
| 82 | ) |
| 83 | result_backend = f"redis://{REDIS_HOST}:{REDIS_PORT}/{REDIS_RESULTS_DB}" |
| 84 | worker_prefetch_multiplier = 1 |
| 85 | task_acks_late = False |
| 86 | beat_schedule = { |
| 87 | "reports.scheduler": { |
| 88 | "task": "reports.scheduler", |
| 89 | "schedule": crontab(minute="*", hour="*"), |
| 90 | }, |
| 91 | "reports.prune_log": { |
| 92 | "task": "reports.prune_log", |
| 93 | "schedule": crontab(minute=10, hour=0), |
| 94 | }, |
| 95 | } |
| 96 | |
| 97 | |
| 98 | CELERY_CONFIG = CeleryConfig |
nothing calls this directly
no outgoing calls
no test coverage detected