To share a queue between hosts with Python, you can use a "SyncManager". There'll be one machine that's the manager/owner of the queue, and then multiple other machines can connect to that queue to pull jobs. You can also share multiprocessing Events (for example a "shutdown" Event to tell all the workers on the queue that they should stop).
First, make an empty class that's a subclass of the multiprocessing.managers.SyncManager:
class CentralManager(multiprocessing.managers.SyncManager):
"""
CentralManager:
A SyncManager class. This synchronizes a shared object across multiple