def send_msg(self, msg, level="debug", message_prefix=""): """ @summary: 叮叮 发送消息 --------- @param msg: 消息 @param developers: 开发者姓名 --------- @result: """ tools.dingding_warning(msg, rate_limit=3600, message_prefix=message_prefix)
def send_msg(self, msg, level="debug", message_prefix=""): if setting.WARNING_LEVEL == "ERROR": if level != "error": return if setting.DINGDING_WARNING_PHONE: keyword = "feapder报警系统\n" tools.dingding_warning(keyword + msg, message_prefix=message_prefix) if setting.EMAIL_RECEIVER: tools.email_warning( msg, message_prefix=message_prefix, title=self._spider_name )
def send_msg(self, msg, level="debug", message_prefix=""): # log.debug("发送报警 level:{} msg{}".format(level, msg)) if setting.WARNING_LEVEL == "ERROR": if level != "error": return if setting.DINGDING_WARNING_URL: keyword = "feapder报警系统\n" tools.dingding_warning(keyword + msg, message_prefix=message_prefix) if setting.EMAIL_RECEIVER: tools.email_warning( msg, message_prefix=message_prefix, title=self._spider_name ) if setting.WECHAT_WARNING_URL: keyword = "feapder报警系统\n" tools.wechat_warning(keyword + msg, message_prefix=message_prefix)