Commit 2c7dddbb authored by Samuel GAIST's avatar Samuel GAIST
Browse files

[worker] Update all send_multipart call and remove str

In Python 3, network is using bytes.
parent ae955119
......@@ -87,7 +87,7 @@ class WorkerController(object):
def destroy(self):
for worker in self.workers:
self.socket.send_multipart([
str(worker),
worker,
WorkerController.SCHEDULER_SHUTDOWN,
])
......@@ -106,24 +106,24 @@ class WorkerController(object):
def execute(self, worker, job_id, configuration):
self.socket.send_multipart([
str(worker),
worker,
WorkerController.EXECUTE,
str(job_id),
simplejson.dumps(configuration)
b'{}'.format(job_id),
simplejson.dumps(configuration).encode('utf-8')
])
def cancel(self, worker, job_id):
self.socket.send_multipart([
str(worker),
worker,
WorkerController.CANCEL,
str(job_id)
b'{}'.format(job_id),
])
def ack(self, worker):
self.socket.send_multipart([
str(worker),
worker,
WorkerController.ACK
])
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment