pioppob opened a new issue #10194:
URL: https://github.com/apache/incubator-superset/issues/10194


   I'm currently unable to configure the email reports. After creating an email 
report, the test email will send and deliver but I have not been receiving any 
subsequent emails.
   
   I have set ENABLE_SCHEDULED_EMAIL_REPORTS to True, also set up geckodriver 
and set the webdriver baseurl, as well as celery and redis.
   
   Also I should note I'm running these in docker containers.
   
   Heres the celery snippet from superset_config.py:
   ```
   REDIS_HOST = get_env_variable('REDIS_HOST')
   REDIS_PORT = get_env_variable('REDIS_PORT')
   
   class CeleryConfig(object):
       BROKER_URL = 'redis://%s:%s/0' % (REDIS_HOST, REDIS_PORT)
       CELERY_IMPORTS = (
           'superset.sql_lab', 
           'superset.tasks',
       )
       CELERY_RESULT_BACKEND = 'redis://%s:%s/1' % (REDIS_HOST, REDIS_PORT)
       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='*'),
           },
       }
       CELERY_TASK_PROTOCOL = 1
   
   
   CELERY_CONFIG = CeleryConfig
   CACHE_CONFIG = {
       'CACHE_TYPE': 'redis',
       'CACHE_DEFAULT_TIMEOUT': 60 * 60 * 24, # 1 day default (in secs)
       'CACHE_KEY_PREFIX': 'superset_results',
       'CACHE_REDIS_URL': 'redis://localhost:6379/0'
   }
   ```
   
   Also here's the docker-compose.yml file:
   ```
   x-superset-build: &superset-build
     context: ../../
     dockerfile: contrib/docker/Dockerfile
   
   x-superset-depends-on: &superset-depends-on
     - redis
   
   x-superset-volumes: &superset-volumes
     - ./superset_config.py:/home/superset/superset/superset_config.py
   
   version: '2'
   services:
     redis:
       image: redis:3.2
       container_name: superset_cache
       restart: unless-stopped
       ports:
         - '127.0.0.1:6379:6379'
       volumes:
         - redis:/data
   
     superset:
       build: *superset-build
       restart: unless-stopped
       environment:
         POSTGRES_DB: '${POSTGRES_DB}'
         POSTGRES_USER: '${POSTGRES_USER}'
         POSTGRES_PASSWORD: '${POSTGRES_PASSWORD}'
         POSTGRES_HOST: '${POSTGRES_HOST}'
         POSTGRES_PORT: '${POSTGRES_PORT}'
         REDIS_HOST: '${REDIS_HOST}'
         REDIS_PORT: '${REDIS_PORT}'
         GOOGLE_APPLICATION_CREDENTIALS: '${GOOGLE_APPLICATION_CREDENTIALS}'
         MAPBOX_API_KEY: '${MAPBOX_API_KEY}'
         SUPERSET_ENV: production
       user: root:root
       ports:
         - 8088:8088
       depends_on: *superset-depends-on
       volumes: *superset-volumes
   
     superset-worker:
       build: *superset-build
       command: ["celery", "worker", "--app=superset.tasks.celery_app:app", 
"--pool=prefork", "-O", "fair", "-c", "4", '--logfile=/logs/celery.log']
       env_file: ./.env
       restart: unless-stopped
       depends_on: *superset-depends-on
       volumes: *superset-volumes
   
     superset-beat:
       build: *superset-build
       command: ["celery", "beat", "--app=superset.tasks.celery_app:app"]
       env_file: ./.env
       restart: unless-stopped
       depends_on: *superset-depends-on
       volumes: *superset-volumes
   ```
   
   Unable to post celery logs because they aren't being directed to stdout and 
I cannot find any other logfile in the containers.


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

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