Initial commit
This commit is contained in:
14
app/jobs/cron/withdraw_audit.rb
Normal file
14
app/jobs/cron/withdraw_audit.rb
Normal file
@@ -0,0 +1,14 @@
|
||||
module Jobs
|
||||
module Cron
|
||||
module WithdrawAudit
|
||||
def self.process
|
||||
# TODO must check with new design of limit
|
||||
Withdraw.accepted.where('updated_at < ?', 30.seconds.ago).each do |withdraw|
|
||||
withdraw.process! if withdraw.verify_limits
|
||||
end
|
||||
|
||||
sleep 30
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user