mirror of https://github.com/hpcaitech/ColossalAI
Browse Source
* [workflow] added notification if scheduled build fails * polish code * polish codepull/2585/head
Frank Lee
2 years ago
committed by
GitHub
3 changed files with 63 additions and 2 deletions
@ -0,0 +1,20 @@
|
||||
import argparse |
||||
|
||||
import requests |
||||
|
||||
|
||||
def parse_args(): |
||||
parser = argparse.ArgumentParser() |
||||
parser.add_argument('-m', '--message', type=str) |
||||
parser.add_argument('-u', '--url', type=str) |
||||
return parser.parse_args() |
||||
|
||||
|
||||
def send_message_to_lark(message, webhook_url): |
||||
data = {"msg_type": "text", "content": {"text": message}} |
||||
requests.post(webhook_url, json=data) |
||||
|
||||
|
||||
if __name__ == '__main__': |
||||
args = parse_args() |
||||
send_message_to_lark(args.message, args.url) |
Loading…
Reference in new issue