当前仓库属于暂停状态,部分功能使用受限,详情请查阅 仓库状态说明
1 Star 0 Fork 9

明天以后/COVID-19_notify
暂停

forked from Jemmy/COVID-19_notify
暂停
 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
Config.py.template 1.87 KB
一键复制 编辑 原始数据 按行查看 历史
Jemmy 提交于 2020-02-03 23:31 . update gitignore
#!/usr/local/bin/python3
# _*_ coding:utf-8 _*_
# 保存项目配置
# 通知开关
NOTIFY_OPTION = {
"dingding": True,
"server_chan": True,
"kafka": False,
"redis": False, # 这个redis和下面的保存已经通知过的信息不一样,这个用于保存城市数据,用于持久化,下面的仅仅是缓存
}
# redis连接信息,用于保存已经通知过的消息
REDIS = {
"host":"127.0.0.1",
"port": 6379,
"index": 1,
"key": "read", # 使用set保存,sadd read message_id
}
# 钉钉通知 help: https://ding-doc.dingtalk.com/doc#/serverapi2/isu6nk
DINGDING = [
{
"header": {"content-type":"application/json"},
"url": "",
"template": {"msgtype": "text", "text": {"content": "我的头发长,天下我为王"}},
}
]
# Server酱(微信)通知,想通知多个人,按照下面的格式添加到列表中即可 help: http://sc.ftqq.com/3.version
SERVER_CHAN = [
{
"token": "", # 你的token
"is_filter": True,
"keywords": ["天津","北京"], # 如果is_filter是True,那么只会通知“天津”和“北京”的消息
},
{
"token":"",
"is_filter": True,
"keywords": ["甘肃","广东"],
}
]
# 持久化配置
PERSISTENCE = {
"mysql": {
"is_save": True,
"connection": {
"host":"127.0.0.1",
"user":"",
"password": "",
"database": "",
"table_name": "",
"create_if_not_exist": True,
}
},
"postgresql":{
"is_save": False,
"connection": {
"host": "127.0.0.1",
"user": "",
"password": "",
"database": "",
}
},
"kafka": {
"server": ["127.0.0.1"],
"topic": "test",
},
"redis": {
"host":"",
"port": 0,
"index": 0,
"password":"",
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/ljx47661774027/COVID-19_notify.git
git@gitee.com:ljx47661774027/COVID-19_notify.git
ljx47661774027
COVID-19_notify
COVID-19_notify
master

搜索帮助