GitHub user user1500177 added a comment to the discussion: Superset DB Log 
Retention & Pruning Strategies


class CeleryConfig(object):
  broker_url = 
f"redis://:{env('REDIS_PASSWORD')}@{env('REDIS_HOST')}:{env('REDIS_PORT')}/0"
  imports = ('superset.sql_lab', 'superset.tasks', 'superset.tasks.thumbnails', 
)
  result_backend = 
f"redis://:{env('REDIS_PASSWORD')}@{env('REDIS_HOST')}:{env('REDIS_PORT')}/0"
  worker_log_level = 'DEBUG'
  task_acks_late = True
  task_time_limit = 86400 #24 hours
  task_soft_time_limit = 86400 #24 hours
  task_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,
        }
  }
  beat_schedule = {
        'reports.scheduler': {
            'task': 'reports.scheduler',
            'schedule': crontab(minute='*', hour='*'),
       },
       'reports.prune_log': {
            'task': 'reports.prune_log',
            'schedule': crontab(minute=0, hour=0),
       },
  }
  broker_connection_retry_on_startup = True 

CELERY_CONFIG = CeleryConfig
RESULTS_BACKEND = RedisCache(
      host=env('REDIS_HOST'),
      port=env('REDIS_PORT'),
      key_prefix='superset_results',
      password=env('REDIS_PASSWORD')
)

RATELIMIT_STORAGE_URI = 
f"redis://:{env('REDIS_PASSWORD')}@{env('REDIS_HOST')}:{env('REDIS_PORT')}/0"


How should i modify this so as to delete the logs OLDER that 1 year ??

GitHub link: 
https://github.com/apache/superset/discussions/35811#discussioncomment-14757809

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: 
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to