peatio icon indicating copy to clipboard operation
peatio copied to clipboard

Use batch updates for canceling orders

Open martianatwork opened this issue 6 years ago • 1 comments

https://github.com/rubykube/peatio/blob/d38ae99fde6aef3273176f55b51ab596cdbf4985/app/api/v2/market/orders.rb#L116

We should do something like this: Order.where(state: 100).find_in_batches {|batch| batch.each {|o| Order.cancel(o.id)}}

Currently, it dosent delete all orders even if the user has like 50 orders. I think we should introduce a daemon that cancels the order.

Also same for creating accounts #2320 this issue can be fixed in a similar way

martianatwork avatar Sep 17 '19 14:09 martianatwork

can you make a pull request?

mod avatar Apr 29 '20 17:04 mod