mirror of
https://github.com/EDCD/EDDN.git
synced 2025-04-26 05:02:15 +03:00
Monitor: Tweak for zmq changes
This commit is contained in:
parent
060645a8dc
commit
c426885b52
@ -13,6 +13,8 @@ import simplejson
|
|||||||
import zmq.green as zmq
|
import zmq.green as zmq
|
||||||
from bottle import Bottle, request, response
|
from bottle import Bottle, request, response
|
||||||
from gevent import monkey
|
from gevent import monkey
|
||||||
|
from zmq import SUB as ZMQ_SUB
|
||||||
|
from zmq import SUBSCRIBE as ZMQ_SUBSCRIBE
|
||||||
|
|
||||||
from eddn.conf.Settings import Settings, load_config
|
from eddn.conf.Settings import Settings, load_config
|
||||||
|
|
||||||
@ -197,8 +199,8 @@ class Monitor(Thread):
|
|||||||
"""Handle receiving Gateway messages and recording stats."""
|
"""Handle receiving Gateway messages and recording stats."""
|
||||||
context = zmq.Context()
|
context = zmq.Context()
|
||||||
|
|
||||||
receiver = context.socket(zmq.SUB)
|
receiver = context.socket(ZMQ_SUB)
|
||||||
receiver.setsockopt_string(zmq.SUBSCRIBE, '')
|
receiver.setsockopt_string(ZMQ_SUBSCRIBE, '')
|
||||||
|
|
||||||
for binding in Settings.MONITOR_RECEIVER_BINDINGS:
|
for binding in Settings.MONITOR_RECEIVER_BINDINGS:
|
||||||
receiver.connect(binding)
|
receiver.connect(binding)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user