Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use batch updates for canceling orders #2369

Open
martianatwork opened this issue Sep 17, 2019 · 1 comment
Open

Use batch updates for canceling orders #2369

martianatwork opened this issue Sep 17, 2019 · 1 comment

Comments

@martianatwork
Copy link

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

@mod
Copy link

mod commented Apr 29, 2020

can you make a pull request?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants