diff options
author | Benjamin Neff <benjamin@coding4coffee.ch> | 2019-07-02 03:37:02 +0300 |
---|---|---|
committer | Benjamin Neff <benjamin@coding4coffee.ch> | 2019-07-03 14:24:27 +0300 |
commit | df4e79b842fa16b370c8c4b07b82bdd328f3ef7e (patch) | |
tree | 0f139c72c9f21f5ad0b2745d1f24cd8189483c8c /config | |
parent | 397dbdbee84182094c71f67ab1082c22a4166ac9 (diff) |
Cleanup pending photos which were never posted with cronjob
Only delete photos older than a day, so we don't delete photos for posts
which were uploaded 10 minutes ago and the author is still writing the
post for it.
closes #8041
Diffstat (limited to 'config')
-rw-r--r-- | config/initializers/sidekiq_scheduled.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/config/initializers/sidekiq_scheduled.rb b/config/initializers/sidekiq_scheduled.rb index ac9140e38..46fc92adb 100644 --- a/config/initializers/sidekiq_scheduled.rb +++ b/config/initializers/sidekiq_scheduled.rb @@ -29,6 +29,11 @@ def default_job_config "class": "Workers::CleanupOldExports" }, + cleanup_pending_photos: { + "cron": "#{random_minute.call} #{random_hour.call} * * *", + "class": "Workers::CleanupPendingPhotos" + }, + queue_users_for_removal: { "cron": "#{random_minute.call} #{random_hour.call} * * *", "class": "Workers::QueueUsersForRemoval" |