0

I am developing sort of money exchange and I want to implement operations which involves an interaction with money (withdrawal, exchange, deposit) in consecutive way. I do it because I want to exclude fraud operations which exploit an asynchrony to withdraw more money that they were given to.

In the scope of the user I want tasks be proceed in the consecutive way, but in the scope of the system I want they be proceed asynchronously. I believe image should clarify what I want. https://postimg.org/image/jdo8cmlm5/.

On the image you may see that first and second tasks were taken by Worker №1 and Worker №2, but third task (exchange) was skipped because, green user is locked by "deposit" task.

Can I implement such behaviour with Celery?

0 Answers0