need help on using workling/starling

Hello!

My rails app's using a queue of tasks that should be handled asynchronously. Task handling should be done in the following way: 1. rails app does some basic logic and puts the further work into the queue of tasks. 2. task manager pops the task off the queue and either delegates it to a worker thread or puts the task back to the queue. 3. then the worker basically does its job.

I'm currently looking into starling/workling but can't see how to implement the task manager logic on top of it. It looks that by using starling/working once a task is in the queue, there is no way to control its execution, e.g. choose the worker to run the task or decide if the task should be sent back or dropped.

What do you think can solve my problem?

Thanks, Kirill