Commit 967387e1 authored by Samuel GAIST's avatar Samuel GAIST

[bcp] Pre-commit cleanup

parent e553ad49
......@@ -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):
......
......@@ -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
......
......@@ -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__)
......
......@@ -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
......
......@@ -34,8 +34,8 @@
"""BEAT Computation worker"""
import logging
import zmq
from .zhelpers import dump
......
......@@ -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
......
......@@ -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__)
......
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