Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
beat
beat.core
Commits
cd97d426
Commit
cd97d426
authored
Mar 20, 2019
by
Samuel GAIST
Browse files
[scripts][worker] Import simplejson as json to make it easy to swap
parent
f2dc73bd
Changes
1
Hide whitespace changes
Inline
Side-by-side
beat/core/scripts/worker.py
View file @
cd97d426
...
...
@@ -62,7 +62,7 @@ import sys
import
logging
import
zmq
import
signal
import
simplejson
import
simplejson
as
json
import
multiprocessing
import
six
...
...
@@ -334,7 +334,7 @@ def main(user_input=None):
execution_process
.
join
()
if
"result"
in
result
:
content
=
simple
json
.
dumps
(
result
[
"result"
])
content
=
json
.
dumps
(
result
[
"result"
])
status
=
WorkerController
.
DONE
if
result
[
"result"
][
"status"
]
!=
0
:
...
...
@@ -383,7 +383,7 @@ def main(user_input=None):
# Command: execute <job-id> <json-command>
if
command
==
WorkerController
.
EXECUTE
:
job_id
=
parts
[
1
]
data
=
simple
json
.
loads
(
parts
[
2
])
data
=
json
.
loads
(
parts
[
2
])
if
args
[
"--docker"
]:
if
docker_network_name
:
data
[
"network_name"
]
=
docker_network_name
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment