diff options
author | pluralcafe-docker <git@plural.cafe> | 2019-01-21 04:35:29 +0000 |
---|---|---|
committer | pluralcafe-docker <git@plural.cafe> | 2019-01-21 04:35:29 +0000 |
commit | b7c67605d5c2110b4a3cd3d8a7b8ef2878cbfe48 (patch) | |
tree | a3344b6105b7771983f69c789fb2f7a0c22a8583 /app/models/user.rb | |
parent | fb7ec403227690f897a9a693f2461b94bf7e2582 (diff) | |
parent | aa362ab73dc7121104b3c01800152b9fc56ea396 (diff) |
Merge branch 'glitch'
Diffstat (limited to 'app/models/user.rb')
-rw-r--r-- | app/models/user.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/user.rb b/app/models/user.rb index 83ccce948..0425c1772 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -362,7 +362,8 @@ class User < ApplicationRecord end def regenerate_feed! - Redis.current.setnx("account:#{account_id}:regeneration", true) && Redis.current.expire("account:#{account_id}:regeneration", 1.day.seconds) + return unless Redis.current.setnx("account:#{account_id}:regeneration", true) + Redis.current.expire("account:#{account_id}:regeneration", 1.day.seconds) RegenerationWorker.perform_async(account_id) end |