Commit c0729340 authored by Samuel GAIST's avatar Samuel GAIST

Merge branch 'job_data_decoding' into 'master'

Worker: decode recieved job data if python older than 3.6

See merge request !58
parents 86049b9d 54860799
Pipeline #27623 passed with stages
in 18 minutes and 52 seconds
......@@ -134,7 +134,7 @@ def run(
worker_address = "tcp://localhost:{}".format(port)
worker = BeatComputationWorker(poller, broker_address, service_name, verbose == 3)
processor = BeatComputationProcessor(poller, processor_address, True) # verbose==3)
processor = BeatComputationProcessor(poller, processor_address, verbose == 3)
execution_processes = []
global stop
......@@ -183,6 +183,8 @@ def run(
if command == BCP.BCPE_EXECUTE:
job_id = request.pop(0)
job_data = request.pop(0)
if sys.version_info < (3, 6):
job_data = job_data.decode("utf-8")
data = json.loads(job_data)
reply = [BCP.BCPP_JOB_RECEIVED, job_id]
......
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