Created
November 29, 2010 08:41
-
-
Save progrium/719736 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import sys | |
| import os | |
| import uuid | |
| import zmq | |
| from zmq import devices | |
| ctx = zmq.Context(10) | |
| datastore = {} | |
| incoming = ctx.socket(zmq.REP) | |
| incoming.bind('ipc:///tmp/frontend-in') | |
| while True: | |
| task = incoming.recv() | |
| id = uuid.uuid4().hex | |
| datastore[id] = task | |
| incoming.send_json({'status':"stored"}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment