dosubot[bot] commented on issue #32676:
URL: https://github.com/apache/superset/issues/32676#issuecomment-2725026909

   <!-- Answer -->
   I found a similar closed issue where the problem was resolved by adding a 
Celery beat worker and adjusting the `superset-config.py` file. Here are the 
key changes that were made:
   
   1. **Adding a Celery Beat Worker**: This involves configuring a container to 
run the Celery beat process. Here's an example configuration:
      ```yaml
      containers:
      - name: superset
        image: "apache/superset:latest"
        imagePullPolicy: IfNotPresent
        command: ["/bin/sh","-c",". /app/pythonpath/superset_bootstrap.sh; 
celery --app=superset.tasks.celery_app:app beat"]
      ```
   
   2. **Updating the `CeleryConfig` Class**: Modify your `superset-config.py` 
to include the necessary Celery configurations:
      ```python
      class CeleryConfig(object):
          BROKER_URL = 
f"redis://default:{env('REDIS_PASSWORD')}@{env('REDIS_HOST')}:{env('REDIS_PORT')}/0"
          CELERY_IMPORTS = ('superset.sql_lab','superset.tasks', )
          CELERY_RESULT_BACKEND = 
f"redis://default:{env('REDIS_PASSWORD')}@{env('REDIS_HOST')}:{env('REDIS_PORT')}/0"
          CELERYD_PREFETCH_MULTIPLIER = 10
          CELERY_ACKS_LATE = True
          CELERY_TASK_PROTOCOL = 1
          CELERY_LOG_LEVEL = 'DEBUG'
          CELERY_ANNOTATIONS = {'tasks.add': {'rate_limit': '10/s'},
                                'sql_lab.get_sql_results': {'rate_limit': 
'100/s',},
                                'email_reports.send': {
                                'rate_limit': '1/s',
                                'time_limit': 600,
                                'soft_time_limit': 600,
                                'ignore_result': True,},}
          CELERYBEAT_SCHEDULE = {
            'email_reports.schedule_hourly': {
                'task': 'email_reports.schedule_hourly',
                'schedule': crontab(minute=1, hour='*'),
            },
            'alerts.schedule_check': {
                'task': 'alerts.schedule_check',
                'schedule': crontab(minute='*', hour='*'),
            },
            'reports.scheduler': {
                'task': 'reports.scheduler',
                'schedule': crontab(minute='*', hour='*'),
            },
            'reports.prune_log': {
                'task': 'reports.prune_log',
                'schedule': crontab(minute=0, hour=0),
            },
            'cache-warmup-hourly': {
                'task': 'cache-warmup',
                'schedule': crontab(minute=0, hour='*'), #hourly
                 'kwargs': {
                    'strategy_name': 'top_n_dashboards',
                    'top_n': 10,
                    'since': '7 days ago',
                },},}
   
      CELERY_CONFIG = CeleryConfig
      RESULTS_BACKEND = RedisCache(
            host=env('REDIS_HOST'),
            port=env('REDIS_PORT'),
            password=env('REDIS_PASSWORD'),
            key_prefix='superset_results'
      )
   
      # Adding email report function
      FEATURE_FLAGS = {
          "ALERT_REPORTS": True,
          "DASHBOARD_NATIVE_FILTERS": True,
          "DASHBOARD_CROSS_FILTERS": True,
          "ENABLE_TEMPLATE_PROCESSING": True,
          "ENABLE_SCHEDULED_EMAIL_REPORTS": True,
          "EMAIL_NOTIFICATIONS": True
      }
      SIP_15_ENABLED = True
   
      ALERT_REPORTS_NOTIFICATION_DRY_RUN = False
   
      EMAIL_NOTIFICATIONS = True
   
      SCREENSHOT_LOCATE_WAIT = 100
      SCREENSHOT_LOAD_WAIT = 600
   
      # Email configuration
      SMTP_HOST = "airlapp.isb.lsy.fra.dlh.de" #change to your host
      SMTP_STARTTLS = False
      SMTP_SSL = False
      SMTP_USER = ""
      SMTP_PORT = XXX # your port eg. 587
      SMTP_PASSWORD = ""
      SMTP_MAIL_FROM = " Superset | Reporting Team <[email protected]>"
   
      WEBDRIVER_BASEURL = "http://superset.<namespace>:8088/"
      WEBDRIVER_BASEURL_USER_FRIENDLY = WEBDRIVER_BASEURL
      ```
   
   3. **Ensuring `SIP_15_ENABLED = True`**: This setting should be enabled, and 
`SMTP_USER` and `SMTP_PASSWORD` should be left empty if not required by your 
SMTP server.
   
   Additionally, ensure that the `ALERT_REPORTS_NOTIFICATION_DRY_RUN` is set to 
`False` in your worker environment to allow actual email sending 
<sup>[[1]](https://github.com/apache/superset/issues/14811)</sup>.
   
   
   <!-- Dosu Comment Footer -->
   *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
   
   ---
   <sup>Help Dosu learn! Give it feedback: [Great 
Response](https://app.dosu.dev/response-feedback/e8a83662-4102-48e4-ac33-6176ba814bf1?feedback_type=great_response)
 | [Irrelevant 
Answer](https://app.dosu.dev/response-feedback/e8a83662-4102-48e4-ac33-6176ba814bf1?feedback_type=irrelevant_answer)
 | [Incorrect 
Sources](https://app.dosu.dev/response-feedback/e8a83662-4102-48e4-ac33-6176ba814bf1?feedback_type=incorrect_sources)
 | [Too 
Verbose](https://app.dosu.dev/response-feedback/e8a83662-4102-48e4-ac33-6176ba814bf1?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/e8a83662-4102-48e4-ac33-6176ba814bf1?feedback_type=hallucination)
 | [Bug 
Report](https://app.dosu.dev/response-feedback/e8a83662-4102-48e4-ac33-6176ba814bf1?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/e8a83662-4102-48e4-ac33-6176ba814bf1?feedback_type=other)</sup>
   


-- 
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]

Reply via email to