oxen-pyoxenmq/examples/test.py
Jeff Becker 32de27c2fe
more
2020-07-22 13:41:46 -04:00

16 lines
284 B
Python

import pylokimq
import time
def handle_ping(args):
print(args)
return args
lmq = pylokimq.LokiMQ()
lmq.listen_plain("ipc:///tmp/lmq.sock")
lmq.add_anonymous_category("python")
lmq.add_request_command("python", "ping", handle_ping)
lmq.start()
while True:
time.sleep(1)