15 lines
322 B
Ruby
15 lines
322 B
Ruby
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
|