diff options
author | Starfall <us@starfall.systems> | 2022-04-29 09:20:51 -0500 |
---|---|---|
committer | Starfall <us@starfall.systems> | 2022-04-29 09:20:51 -0500 |
commit | 4eb291e5db6114c8aa564f0c9e7f04d13805b5cc (patch) | |
tree | 1a6affcf635974ccf6d0f650a3bbe2be75c7929e /app/workers/scheduler | |
parent | bcaacc42334d75bd361f330989041a9beba101a9 (diff) | |
parent | 252deefe3433d0cedafd973becd0d85b5182eb49 (diff) |
Merge remote-tracking branch 'glitch/main'
Diffstat (limited to 'app/workers/scheduler')
-rw-r--r-- | app/workers/scheduler/accounts_statuses_cleanup_scheduler.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/app/workers/scheduler/accounts_statuses_cleanup_scheduler.rb b/app/workers/scheduler/accounts_statuses_cleanup_scheduler.rb index 7195f0ff9..bd92fe32c 100644 --- a/app/workers/scheduler/accounts_statuses_cleanup_scheduler.rb +++ b/app/workers/scheduler/accounts_statuses_cleanup_scheduler.rb @@ -2,6 +2,7 @@ class Scheduler::AccountsStatusesCleanupScheduler include Sidekiq::Worker + include Redisable # This limit is mostly to be nice to the fediverse at large and not # generate too much traffic. @@ -83,14 +84,14 @@ class Scheduler::AccountsStatusesCleanupScheduler end def last_processed_id - Redis.current.get('account_statuses_cleanup_scheduler:last_account_id') + redis.get('account_statuses_cleanup_scheduler:last_account_id') end def save_last_processed_id(id) if id.nil? - Redis.current.del('account_statuses_cleanup_scheduler:last_account_id') + redis.del('account_statuses_cleanup_scheduler:last_account_id') else - Redis.current.set('account_statuses_cleanup_scheduler:last_account_id', id, ex: 1.hour.seconds) + redis.set('account_statuses_cleanup_scheduler:last_account_id', id, ex: 1.hour.seconds) end end end |