Skip to content

Instantly share code, notes, and snippets.

@progrium
Created November 29, 2010 08:41
Show Gist options
  • Select an option

  • Save progrium/719736 to your computer and use it in GitHub Desktop.

Select an option

Save progrium/719736 to your computer and use it in GitHub Desktop.
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