File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -16,11 +16,12 @@ def perform()
1616 end
1717 Rails . cache . write ( key , local_tip_block . id )
1818
19- Address . where ( id : contained_address_ids ) . find_in_batches do |group |
20- sleep ( 50 ) # Make sure it doesn't get too crowded in there!
19+ Address . where ( id : contained_address_ids ) . find_in_batches ( batch_size : 100 ) . with_index do |group , batch |
20+ puts "Processing group # #{ batch } "
2121 address_attributes = [ ]
2222
2323 group . each do |addr |
24+ # puts addr.id
2425 balance , balance_occupied = addr . cal_balance
2526 address_attributes << {
2627 id : addr . id ,
Original file line number Diff line number Diff line change @@ -115,6 +115,10 @@ def call_worker(clz)
115115 call_worker ContractStatisticWorker
116116end
117117
118+ s . every "10h" overlap : false do
119+ call_worker CalculateAddressInfoWorker
120+ end
121+
118122s . cron "0,30 * * * *" do
119123 BitcoinStatistic . refresh
120124end
You can’t perform that action at this time.
0 commit comments