代码拉取完成,页面将自动刷新
# coding: utf-8
import urllib3
from sanic import Sanic
from urllib3.exceptions import InsecureRequestWarning
from app import init_app, prompt_info
from core.common.enum import AgentMode
from core.common.log import logger
from conf import SERVICE_CONFIG
from core.scheduler import run_scheduler_forever, run_by_threaded
# 忽略InsecureRequestWarning警告
urllib3.disable_warnings(InsecureRequestWarning)
def main():
app: Sanic = init_app()
logger.info(prompt_info)
if SERVICE_CONFIG.get('mode') == AgentMode.ACTIVE:
run_by_threaded(run_scheduler_forever)
app.run(
host='0.0.0.0',
port=app.config.get('APP_PORT'),
# workers=app.config.get('WORKS_NUM'),
# auto_reload=True,
single_process=True
)
if __name__ == '__main__':
main()
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。