MCPcopy Create free account
hub / github.com/aaPanel/BaoTa / push_msg

Function push_msg

script/shell_push.py:47–54  ·  view source on GitHub ↗
(echo, channel, keyword, name)

Source from the content-addressed store, hash-verified

45
46
47def push_msg(echo, channel, keyword, name):
48 data = get_cron_log(echo)
49 if not data[0]: return
50 data = data[1]
51 if keyword:
52 if keyword in data:
53 data = public.get_push_info('计划任务shell告警', ["任务名称:{}".format(name),"告警关键词:{}".format(keyword)])
54 send_msg(channel, data)
55
56
57def send_msg(channels, data):

Callers 1

shell_push.pyFile · 0.70

Calls 3

get_cron_logFunction · 0.85
send_msgFunction · 0.85
formatMethod · 0.45

Tested by

no test coverage detected