3 Star 7 Fork 6

Gitee 极速下载/xiaoniu-cron

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/aniu-lee/xiaoniu_cron
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
manage.py 891 Bytes
一键复制 编辑 原始数据 按行查看 历史
aniulee 提交于 2022-12-26 14:48 +08:00 . 1.增加 钉钉通知
#!/usr/bin/env python
#coding:utf-8
import os
from flask import current_app
from flask_migrate import Migrate, MigrateCommand
from flask_script import Manager, Shell
from app import create_app, db
from app.common.functions import dd_push
from datas.model.cron_infos import CronInfos
from datas.model.job_log import JobLog
from datas.model.job_log_items import JobLogItems
app = create_app(os.getenv('FLASK_CONFIG') or 'default')
manager = Manager(app)
migrate = Migrate(app, db)
def make_shell_context():
return dict(
app=app,
JobLog=JobLog,
CronInfos=CronInfos,
JobLogItems=JobLogItems
)
manager.add_command("shell", Shell(make_context=make_shell_context))
manager.add_command('db', MigrateCommand)
@manager.command
def test():
pass
if __name__ == '__main__':
#gunicorn -b 127.0.0.1:5000 -w 1 -k gevent manage:app
manager.run()
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/mirrors/xiaoniu-cron.git
git@gitee.com:mirrors/xiaoniu-cron.git
mirrors
xiaoniu-cron
xiaoniu-cron
master

搜索帮助