I have a method which recieves a file and this file then gets processed. But the processing takes quite long so I wanna do that in the background and just tell the user that this file will be processed now. But my requirement is that this task can only get called when the call before has finished. So the user then should get an error that he must wait.
I know I could queue the processing but I want to keep it simple.
So how can I do that? And would there be some method to request if the this task is finished or not so the client can refresh a status and fetch a flag if the task is finished or not?