diff options
author | Claire <claire.github-309c@sitedethib.com> | 2022-04-28 19:24:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-28 19:24:18 +0200 |
commit | 78f7f23ad21359893cb022b7c2f7644d5c22cb43 (patch) | |
tree | 77b919683a8656a361d7d62c8745233bc8b2d310 /app/workers/scheduler/accounts_statuses_cleanup_scheduler.rb | |
parent | 6a9d1549484a6fb02d7d01e884577a7185302046 (diff) | |
parent | f23f784f1811a5e7ae82faaf8868e389e9608f5d (diff) |
Merge pull request #1756 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/workers/scheduler/accounts_statuses_cleanup_scheduler.rb')
-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 |