diff options
author | pluralcafe-docker <git@plural.cafe> | 2019-01-21 04:35:41 +0000 |
---|---|---|
committer | pluralcafe-docker <git@plural.cafe> | 2019-01-21 04:35:41 +0000 |
commit | 657438e95054ba1f161db698acdf7f1a871d1c9c (patch) | |
tree | a3344b6105b7771983f69c789fb2f7a0c22a8583 /app/models/user.rb | |
parent | d899138556513c8a5fa3397606ecc4752b7c6785 (diff) | |
parent | b7c67605d5c2110b4a3cd3d8a7b8ef2878cbfe48 (diff) |
Merge branch 'master' into production
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 |