Fix pubsub packet creation.
This commit is contained in:
parent
19f68971f2
commit
5f502fedb5
|
@ -45,7 +45,7 @@ class Publisher:
|
||||||
self.socket.bind(addr)
|
self.socket.bind(addr)
|
||||||
|
|
||||||
def publish(self, message, topic=b''):
|
def publish(self, message, topic=b''):
|
||||||
message = proto.Packet(topic=topic, created=int(time.time()), payload=message)
|
message = proto.Packet(topic=topic, timestamp=int(time.time()), payload=message)
|
||||||
return self.socket.send(message.SerializeToString())
|
return self.socket.send(message.SerializeToString())
|
||||||
|
|
||||||
def publish_json(self, message, topic=b''):
|
def publish_json(self, message, topic=b''):
|
||||||
|
|
Loading…
Reference in New Issue