zctx = zmq.Context()
zsub = zctx.socket(zmq.SUB)
zsub.connect(conf.get("collector", "publishurl"))
- tosub = topic(WIFI_POSITIONING.PROTO)
- zsub.setsockopt(zmq.SUBSCRIBE, tosub)
+ zsub.setsockopt(zmq.SUBSCRIBE, topic(WIFI_POSITIONING.PROTO))
zpush = zctx.socket(zmq.PUSH)
zpush.connect(conf.get("collector", "listenurl"))
)
resp = Resp(
imei=zmsg.imei,
+ when=zmsg.when, # not the current time, but the original!
packet=msg.Out(latitude=lat, longitude=lon).packed,
)
log.debug("Response for lat=%s, lon=%s: %s", lat, lon, resp)