# Path: dHydra/console.py
# def init_logger():
# def start(worker_name=None, nickname=None):
# def terminate(nickname=None):
# def start_worker(worker_name=None, nickname=None, **kwargs):
# def stop_worker(nickname=None):
# def send_command(
#         channel_name="dHydra.Command",
#         command_type="sys",
#         operation_name=None,
#         token=None,
#         kwargs={}
# ):
# 
# Path: dHydra/core/Functions.py
# def get_vendor(name, vendor_name=None, **kwargs):
#     """
#     get_vendor方法，动态加载vendor类
#     """
#     logger = logging.getLogger('Functions')
#     if vendor_name is None:
#         vendor_name = "V-" + name
#     class_name = name
#     module_name = 'Vendor.' + name + '.' + class_name
#     if os.path.exists(
#         os.getcwd() + "/Vendor/" +
#         name + "/" + class_name + ".py"
#     ):
#         try:
#             instance = getattr(
#                 __import__(module_name, globals(), locals(), [class_name], 0),
#                 class_name
#             )(**kwargs)
#         except ImportError:
#             traceback.print_exc()
#     else:
#         try:
#             instance = getattr(
#                 __import__(
#                     "dHydra." + module_name,
#                     globals(),
#                     locals(),
#                     [class_name],
#                     0
#                 ),
#                 class_name
#             )(**kwargs)
#         except ImportError:
#             traceback.print_exc()
#     return instance


from dHydra.console import logger, get_worker_class
from dHydra.core.Functions import get_vendor
import click
import multiprocessing
import time
import os
import json
import traceback
import sys
import pickle
    import signal
    import signal
    import sys
    import threading
    import time
    import dHydra.web

__redis__ = get_vendor("DB").get_redis()

__current_process__ = multiprocessing.current_process()
worker_dict = dict()


def __on_termination__(sig, frame):

# Path: dHydra/console.py
# def init_logger():
# def start(worker_name=None, nickname=None):
# def terminate(nickname=None):
# def start_worker(worker_name=None, nickname=None, **kwargs):
# def stop_worker(nickname=None):
# def send_command(
#         channel_name="dHydra.Command",
#         command_type="sys",
#         operation_name=None,
#         token=None,
#         kwargs={}
# ):
# 
# Path: dHydra/core/Functions.py
# def get_vendor(name, vendor_name=None, **kwargs):
#     """
#     get_vendor方法，动态加载vendor类
#     """
#     logger = logging.getLogger('Functions')
#     if vendor_name is None:
#         vendor_name = "V-" + name
#     class_name = name
#     module_name = 'Vendor.' + name + '.' + class_name
#     if os.path.exists(
#         os.getcwd() + "/Vendor/" +
#         name + "/" + class_name + ".py"
#     ):
#         try:
#             instance = getattr(
#                 __import__(module_name, globals(), locals(), [class_name], 0),
#                 class_name
#             )(**kwargs)
#         except ImportError:
#             traceback.print_exc()
#     else:
#         try:
#             instance = getattr(
#                 __import__(
#                     "dHydra." + module_name,
#                     globals(),
#                     locals(),
#                     [class_name],
#                     0
#                 ),
#                 class_name
#             )(**kwargs)
#         except ImportError:
#             traceback.print_exc()
#     return instance


# Path: dHydra/main.py
from dHydra.console import logger, get_worker_class
from dHydra.core.Functions import get_vendor
import click
import multiprocessing
import time
import os
import json
import traceback
import sys
import pickle
    import signal
    import signal
    import sys
    import threading
    import time
    import dHydra.web


__redis__ = get_vendor("DB").get_redis()

__current_process__ = multiprocessing.current_process()
worker_dict = dict()


def __on_termination__(sig, frame):

    logger.info("The dHydra Server is about to terminate, pid:{}"