Commit 8b226b51 by 陈森彬

add mongo_none_data_rate_monitor

parent d7eb5d44
Showing with 14 additions and 0 deletions
......@@ -58,6 +58,18 @@ def task_running_flag_monitor():
dd_send_msg(traceback.format_exc())
time.sleep(60 * 5)
def mongo_none_data_rate_monitor():
while True:
try:
msg = mongo.get_platform_none_data_rate ()
if msg:
logger.info(msg)
dd_send_msg(msg)
time.sleep(3 * 60 * 60)
except Exception:
logger.error(traceback.format_exc())
dd_send_msg(traceback.format_exc())
time.sleep(60 * 5)
def main():
thread_monitor1 = threading.Thread(target=task_fail_rate_monitor)
......@@ -66,6 +78,8 @@ def main():
thread_monitor2.start()
thread_monitor3 = threading.Thread(target=task_running_flag_monitor)
thread_monitor3.start()
thread_monitor4 = threading.Thread(target=mongo_none_data_rate_monitor)
thread_monitor4.start()
if __name__ == "__main__":
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment