Skip to content

Commit ea631d5

Browse files
authored
fix: set token collection h24_ckb_transactions_count 0 before update (#2415)
Signed-off-by: Miles Zhang <mingchang555@hotmail.com>
1 parent 9ef25e8 commit ea631d5

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

app/workers/update_h24_ckb_transactions_count_on_collections_worker.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ class UpdateH24CkbTransactionsCountOnCollectionsWorker
33
sidekiq_options queue: "low"
44

55
def perform
6+
TokenCollection.update_all(h24_ckb_transactions_count: 0)
67
TokenItem.joins(:collection).includes(:collection).where("token_items.updated_at > ?", 1.hour.ago).each do |item|
78
item.collection.update_h24_ckb_transactions_count
89
end

0 commit comments

Comments
 (0)