# Path: dHydra/core/Vendor.py
# class Vendor:
# 
#     def __init__(
#         self,
#         log_path="log",                     #
#         console_log=True,                   # 屏幕打印日志开关，默认True
#         console_log_level=logging.INFO,     # 屏幕打印日志的级别，默认为INFO
#         critical_log=False,                 # critica单独l写文件日志，默认关闭
#         error_log=True,                     # error级别单独写文件日志，默认开启
#         warning_log=False,                  # warning级别单独写日志，默认关闭
#         info_log=True,                      # info级别单独写日志，默认开启
#         debug_log=False,                    # debug级别日志，默认关闭
#         **kwargs
#     ):
#         self.logger = util.get_logger(
#             log_path=log_path,                     #
#             console_log=console_log,              # 屏幕打印日志开关，默认True
#             console_log_level=console_log_level,  # 屏幕打印日志的级别，默认为INFO
#             critical_log=critical_log,        # critica单独l写文件日志，默认关闭
#             error_log=error_log,             # error级别单独写文件日志，默认开启
#             warning_log=warning_log,         # warning级别单独写日志，默认关闭
#             info_log=info_log,               # info级别单独写日志，默认开启
#             debug_log=debug_log,             # debug级别日志，默认关闭
#             logger_name=self.__class__.__name__,
#         )
# 
# 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


import dHydra.core.util as util
import copy
from dHydra.core.Vendor import Vendor
from datetime import datetime, timedelta
from pymongo import MongoClient
from dHydra.core.Functions import get_vendor
# -*- coding: utf-8 -*-
"""
# Created on
# @author:
# @contact:
"""
# 以下是自动生成的 #
# --- 导入系统配置
# --- 导入自定义配置
# 以上是自动生成的 #


class WorkerManager(Vendor):

    def __init__(self, **kwargs):
        super().__init__(**kwargs)

# Path: dHydra/core/Vendor.py
# class Vendor:
# 
#     def __init__(
#         self,
#         log_path="log",                     #
#         console_log=True,                   # 屏幕打印日志开关，默认True
#         console_log_level=logging.INFO,     # 屏幕打印日志的级别，默认为INFO
#         critical_log=False,                 # critica单独l写文件日志，默认关闭
#         error_log=True,                     # error级别单独写文件日志，默认开启
#         warning_log=False,                  # warning级别单独写日志，默认关闭
#         info_log=True,                      # info级别单独写日志，默认开启
#         debug_log=False,                    # debug级别日志，默认关闭
#         **kwargs
#     ):
#         self.logger = util.get_logger(
#             log_path=log_path,                     #
#             console_log=console_log,              # 屏幕打印日志开关，默认True
#             console_log_level=console_log_level,  # 屏幕打印日志的级别，默认为INFO
#             critical_log=critical_log,        # critica单独l写文件日志，默认关闭
#             error_log=error_log,             # error级别单独写文件日志，默认开启
#             warning_log=warning_log,         # warning级别单独写日志，默认关闭
#             info_log=info_log,               # info级别单独写日志，默认开启
#             debug_log=debug_log,             # debug级别日志，默认关闭
#             logger_name=self.__class__.__name__,
#         )
# 
# 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/Vendor/WorkerManager/WorkerManager.py
import dHydra.core.util as util
import copy
from dHydra.core.Vendor import Vendor
from datetime import datetime, timedelta
from pymongo import MongoClient
from dHydra.core.Functions import get_vendor

# -*- coding: utf-8 -*-
"""
# Created on
# @author:
# @contact:
"""
# 以下是自动生成的 #
# --- 导入系统配置
# --- 导入自定义配置
# 以上是自动生成的 #


class WorkerManager(Vendor):

    def __init__(self, **kwargs):
        super().__init__(**kwargs)

        self.redis = get_vendor("DB").get_redis()