def inner_wrapper(request, *args, **kwargs): msg_data = "before process request data:\n{data}".format(data=parser.format_json(request.data)) msg_params = "before process request params:\n{params}".format( params=parser.format_json(request.query_params)) if level is 'INFO': if request.data: logger.info(msg_data) if request.query_params: logger.info(msg_params) elif level is 'DEBUG': if request.data: logger.debug(msg_data) if request.query_params: logger.debug(msg_params) return func(request, *args, **kwargs)
def __init__(self, **kwargs): logger.info("before process task data:\n {kwargs}".format(kwargs=format_json(kwargs))) self.__name = kwargs["name"] self.__data = kwargs["data"] self.__corntab = kwargs["corntab"] self.__switch = kwargs["switch"] self.__task = "fastrunner.tasks.schedule_debug_suite" self.__project = kwargs["project"] self.__email = { "strategy": kwargs["strategy"], "copy": kwargs["copy"], "receiver": kwargs["receiver"], "corntab": self.__corntab, "project": self.__project } self.__corntab_time = None
def __init__(self, **kwargs): logger.info("before process task data:\n {kwargs}".format(kwargs=format_json(kwargs))) self.__name = kwargs["name"] self.__data = kwargs["data"] self.__crontab = kwargs["crontab"] self.__switch = kwargs["switch"] self.__task = "fastrunner.tasks.schedule_debug_suite" self.__project = kwargs["project"] self.__email = { "strategy": kwargs["strategy"], "mail_cc": kwargs.get("mail_cc"), "receiver": kwargs.get("receiver"), "crontab": self.__crontab, "project": self.__project, "task_name": self.__name, "webhook": kwargs["webhook"], "updater": kwargs.get("updater"), "creator": kwargs.get("creator"), } self.__crontab_time = None