I have a task queue, queue A, and a resource queue, queue B. At program start, there are a finite number of resources put in queue B. Tasks may execute if they're able to pull a resource from queue B, and once they're done executing they must put the resource back in queue B.
Using Celery, is there a way to pull from a different queue inside a task to accomplish this? Or does this need to be architected completely differently?
An alternative, albeit with potentially reduced concurrency, is pairing the task with a resource before it's put in the task queue, then polling the task for completion, and on completion freeing up that resource and putting it back in the task queue with a different task. Is this the standard solution?