use ExtendedJSONEncoder
This commit is contained in:
@@ -1,6 +1,8 @@
|
|||||||
import numpy as np
|
import numpy as np
|
||||||
import zmq
|
import zmq
|
||||||
|
|
||||||
|
from .utils import ExtendedJSONEncoder
|
||||||
|
|
||||||
|
|
||||||
FLAGS = 0
|
FLAGS = 0
|
||||||
|
|
||||||
@@ -61,10 +63,10 @@ class ZMQSocketsWorker:
|
|||||||
|
|
||||||
|
|
||||||
def send_accumulator(self, results):
|
def send_accumulator(self, results):
|
||||||
self.accumulator_socket.send_json(results, FLAGS)
|
self.accumulator_socket.send_json(results, FLAGS, cls=ExtendedJSONEncoder)
|
||||||
|
|
||||||
def send_visualisation(self, results, data):
|
def send_visualisation(self, results, data):
|
||||||
self.visualisation_socket.send_json(results, FLAGS | zmq.SNDMORE)
|
self.visualisation_socket.send_json(results, FLAGS | zmq.SNDMORE, cls=ExtendedJSONEncoder)
|
||||||
self.visualisation_socket.send(data, FLAGS, copy=True, track=True)
|
self.visualisation_socket.send(data, FLAGS, copy=True, track=True)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user