Thomas Stephens (uStudio)
https://github.com/ustudio/Blueque
http://ustudio.github.io/Blueque/introducing-blueque.html
In [ ]:
import time
from blueque import Client
from blueque import forking_runner
def do_work(task):
print(task.id, task.parameters)
time.sleep(1000)
return 'result'
if __name__ == '__main__':
client = Client(hostname='localhost', port=6379, db=0)
forking_runner.run(client, 'some.queue', do_work)
In [ ]:
from blueque import Client
import time
client = Client()
queue = client.get_queue()
# ...