Skip to content
GitLab
Menu
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
967387e1
Commit
967387e1
authored
Jul 06, 2020
by
Samuel GAIST
Browse files
[bcp] Pre-commit cleanup
parent
e553ad49
Changes
7
Hide whitespace changes
Inline
Side-by-side
beat/core/bcp/broker.py
View file @
967387e1
...
...
@@ -49,15 +49,14 @@ Options:
-V, --version Show version
-v, --verbose Increases the output verbosity level
"""
import
os
import
sys
from
docopt
import
docopt
from
..bcpapi.broker
import
BeatComputationBroker
from
..version
import
__version__
from
..utils
import
setup_logging
from
..version
import
__version__
def
run
(
port
=
5555
,
verbose
=
1
,
callbacks
=
None
):
...
...
beat/core/bcp/worker.py
View file @
967387e1
...
...
@@ -61,28 +61,25 @@ Options:
--cache-mount-point=<cache_mount_point> NFS mount point to use for cache setup
"""
import
os
import
sys
import
signal
import
sys
import
tempfile
import
simplejson
as
json
from
socket
import
gethostname
import
simplejson
as
json
import
zmq
from
socket
import
gethostname
from
docopt
import
docopt
from
..bcpapi
import
BCP
from
..bcpapi.worker
import
BeatComputationWorker
from
..bcpapi.processor
import
BeatComputationProcessor
from
..bcpapi.execution
import
ExecutionProcess
from
..bcpapi.processor
import
BeatComputationProcessor
from
..bcpapi.worker
import
BeatComputationWorker
from
..dock
import
Host
from
..utils
import
find_free_port
from
..utils
import
setup_logging
from
..version
import
__version__
logger
=
None
...
...
beat/core/bcpapi/broker.py
View file @
967387e1
...
...
@@ -37,20 +37,16 @@
Inspired by the Majordomo Protocol Broker
"""
import
logging
import
time
import
signal
import
time
from
binascii
import
hexlify
import
zmq
# local
from
.
import
BCP
from
.zhelpers
import
dump
logger
=
logging
.
getLogger
(
__name__
)
...
...
beat/core/bcpapi/execution.py
View file @
967387e1
...
...
@@ -40,17 +40,16 @@ management
Execution utilities
"""
import
logging
import
multiprocessing
import
signal
import
zmq
import
simplejson
as
json
import
zmq
from
..dock
import
Host
from
..execution.local
import
LocalExecutor
from
..execution.docker
import
DockerExecutor
from
..execution.local
import
LocalExecutor
from
.
import
BCP
...
...
beat/core/bcpapi/processor.py
View file @
967387e1
...
...
@@ -34,8 +34,8 @@
"""BEAT Computation worker"""
import
logging
import
zmq
from
.zhelpers
import
dump
...
...
beat/core/bcpapi/worker.py
View file @
967387e1
...
...
@@ -34,14 +34,12 @@
"""BEAT Computation worker"""
import
logging
import
time
import
zmq
# BEAT Computation protocol constants:
from
.
import
BCP
from
.zhelpers
import
dump
logger
=
logging
.
getLogger
(
__name__
)
...
...
@@ -58,8 +56,8 @@ class BeatComputationWorker(object):
service
=
service
.
encode
(
"utf-8"
)
self
.
heartbeat_at
=
(
0
)
# When to send HEARTBEAT (relative to time.time(), so in seconds)
0
# When to send HEARTBEAT (relative to time.time(), so in seconds)
)
self
.
liveness
=
0
# How many attempts left
self
.
heartbeat
=
2500
# Heartbeat delay, msecs
self
.
reconnect
=
2500
# Reconnect delay, msecs
...
...
beat/core/bcpapi/zhelpers.py
View file @
967387e1
...
...
@@ -38,9 +38,9 @@ Helper module for common zmq task
Based on Majordomo protocol zhelpers.
"""
import
binascii
import
logging
import
zmq
logger
=
logging
.
getLogger
(
__name__
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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