How can deferred work depend on other work?

With Rails 3.2, is it possible to configure a delayed task so that it depends on another pending task, so that it will not work until another task finishes (successfully or not)? I have a class that repels a large number of pending tasks that need to be run sequentially to prevent a race condition. For performance reasons, it is impossible to wait for each task to finish synchronously, but if it is not possible to establish the dependencies on the tasks, I could create a pending task that starts each task in turn and waits for it to complete.

+4
source share
1 answer

I agree with the author of this thread :

I would create a model to track which steps are completed, and not complete the next step until the previous ones are completed.

+1
source

All Articles