diff options
| author | sideshowdave7 | 2017-04-03 09:36:40 -0600 |
|---|---|---|
| committer | sideshowdave7 | 2017-04-03 09:36:40 -0600 |
| commit | ab8434c16178aa609beb8a27f3cab88e392c64da (patch) | |
| tree | 42c962721864711b62fce3d43b921ccf48e68063 /bin/send_msg | |
| parent | 860a110aae76ac49a3ca78b0829a072a2de9ef6f (diff) | |
| download | eventmq-ab8434c16178aa609beb8a27f3cab88e392c64da.tar.gz eventmq-ab8434c16178aa609beb8a27f3cab88e392c64da.zip | |
version bump to 0.3.4
Diffstat (limited to 'bin/send_msg')
| -rwxr-xr-x | bin/send_msg | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/bin/send_msg b/bin/send_msg index 95dc3de..652010c 100755 --- a/bin/send_msg +++ b/bin/send_msg | |||
| @@ -22,15 +22,19 @@ if __name__ == "__main__": | |||
| 22 | 'callable': 'pretend_job', | 22 | 'callable': 'pretend_job', |
| 23 | 'class_args': ('blurp',), | 23 | 'class_args': ('blurp',), |
| 24 | 'class_kwargs': {'kwarg1': True}, | 24 | 'class_kwargs': {'kwarg1': True}, |
| 25 | 'args': (2, ), | 25 | 'args': (10, ), |
| 26 | 'kwargs': {} | 26 | 'kwargs': {} |
| 27 | }] | 27 | }] |
| 28 | 28 | ||
| 29 | send_request(s, msg, guarantee=True, reply_requested=True, timeout=1) | 29 | msgid = send_request(s, msg, guarantee=True, reply_requested=True, timeout=200) |
| 30 | # print zmq.POLLOUT | 30 | print 'Sent message, use msgid={} to track responses'.format(msgid) |
| 31 | # events = dict(poller.poll(500)) | 31 | events = dict(poller.poll(500)) |
| 32 | # print events | 32 | if events[s.zsocket] == zmq.POLLIN: |
| 33 | # if events[s.zsocket] == zmq.POLLIN: | 33 | msg = s.recv_multipart() |
| 34 | # msg = s.recv_multipart() | 34 | print msg |
| 35 | 35 | ||
| 36 | # print msg | 36 | # Wait for job reply |
| 37 | events = dict(poller.poll(50000)) | ||
| 38 | if events[s.zsocket] == zmq.POLLIN: | ||
| 39 | msg = s.recv_multipart() | ||
| 40 | print msg | ||