Skip to content

Commit

Permalink
pipeline breadcrumb
Browse files Browse the repository at this point in the history
  • Loading branch information
jtomchak committed Dec 12, 2023
1 parent 943b85d commit 6856dcb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions app/lib/mammoth/status_origin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,10 @@ def add_mammoth_pick(status, user)
# Add reason by key id
# Expire Reason in 7 days
def add_reason(key, reason)
redis.sadd(key, reason)
redis.expire(key, 7.day.seconds)
redis.pipelined do |pipeline|
pipeline.sadd(key, reason)
pipeline.expire(key, 7.day.seconds)
end
end

def find(status_id, acct = nil)
Expand Down

0 comments on commit 6856dcb

Please sign in to comment.