feat: configuration support

This commit is contained in:
Swann Martinez
2019-07-01 18:04:35 +02:00
parent 34dc4088b5
commit fa18061687
8 changed files with 126 additions and 38 deletions

View File

@ -12,7 +12,7 @@ from random import randint
import zmq
import json
from . import helpers, message
from . import environment, helpers, message
from .libs import dump_anything, umsgpack
CONNECT_TIMEOUT = 2
@ -23,7 +23,7 @@ DUMP_AGENTS_NUMBER = 1
lock = threading.Lock()
logger = logging.getLogger(__name__)
logging.basicConfig(level=logging.DEBUG)
logging.basicConfig(level=environment)
instance = None
@ -202,6 +202,7 @@ class Client(object):
line = json.dumps(value.body)
fp.write(line)
class Server(object):
address = None # Server address
port = None # Server port