Commit b2c86255 authored by 张彦钊's avatar 张彦钊

Merge branch 'zhao82' into 'master'

钉钉监控增加merchat索引

See merge request !1
parents abccff50 ba96259a
......@@ -29,6 +29,8 @@ token_dict = {
'access_token': "9e5c7d5b6249ca1d968bbf7dc9dd9caf0f8ab4ea37b18337b33746cad5a7a5e6"},
"graces-es6-tapir-lbs": {'secret': "SECa54a42411200fd7c642921c35b7d0fe5a71c93e7305091413292bb6cc6cb318c",
'access_token': "9e5c7d5b6249ca1d968bbf7dc9dd9caf0f8ab4ea37b18337b33746cad5a7a5e6"},
"graces-es6-tapir-merchant": {'secret': "SECa54a42411200fd7c642921c35b7d0fe5a71c93e7305091413292bb6cc6cb318c",
'access_token': "9e5c7d5b6249ca1d968bbf7dc9dd9caf0f8ab4ea37b18337b33746cad5a7a5e6"},
"mentha-tapir-tractate": {'secret': "SECba5212dadad3794b3da51c903c828f60ab8342897af2675f1f48fceb8858eb5c",
'access_token': "df546521ce46bfb35025ca266efc2d7e8d708d1c8ada9b15ae487786ad06ad12"},
}
......@@ -76,7 +78,7 @@ def len_list_and_send_msg(redis_clint, key_name, rules, per_sec=10):
# print(key_name,res)
str_res = rules.parse(key_name, res, per_sec=per_sec)
if str_res:
if key_name in ["graces-tapir-card","graces-es6-tapir-lbs"]:
if key_name in ["graces-tapir-card","graces-es6-tapir-lbs","graces-es6-tapir-merchant"]:
send_msg_to_dingtalk(str_res, mobiles=["19566173658"], secret=token_dict[key_name]['secret'],
access_token=token_dict[key_name]['access_token'])
else:
......@@ -98,6 +100,7 @@ if __name__ == "__main__":
"mentha-tapir-answer": redis_new_mimas,
"graces-tapir-card":redis_new_gaia,
"graces-es6-tapir-lbs": redis_new_gaia,
"graces-es6-tapir-merchant": redis_new_gaia,
"mentha-tapir-tractate": redis_new_mimas,
}
per_sec = 60 * 5
......
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 to comment