代码拉取完成,页面将自动刷新
# -*- coding: utf-8 -*-
import asyncio
import sys
import time
from concurrent.futures.thread import ThreadPoolExecutor
import peewee_async
import tornado.ioloop
# from KcangNacos import nacos
from tornado.options import parse_command_line, options
from tornado.platform.asyncio import AsyncIOMainLoop
# import uvloop
from config import make_app
# 接受命令行参数
# from config import make_app
from database.xMySQL_1 import *
parse_command_line()
# start_old
app = make_app()
# start_new
# app = Application()
# 启动项目
if __name__ == "__main__":
print("""
_oo0oo_
o8888888o
88" . "88
(| -_- |)
0\ = /0
___/`---'\___
.' \| |# '.
/ \||| : |||# \
/ _||||| -:- |||||- \
| | \ - #/ | |
| \_| ''\---/'' |_/ |
\ .-\__ '-' ___/-. /
___'. .' /--.--\ `. .'___
."" '< `.___\_<|>_/___.' >' "".
| | : `- \`.;`\ _ /`;.`/ - ` : | |
\ \ `_. \_ __\ /__ _/ .-` / /
=====`-.____`.___ \_____/___.-`___.-'=====
`=---='
""")
database.is_closed()
parse_command_line()
# # nacosServer = nacos.nacos(ip=nacosIp, port=nacosPort)
# # nacosServer.registerService(serviceIp=nacosIp, servicePort=nacosPort, serviceName="pythonHe",
# # namespaceId="", groupName="")
AsyncIOMainLoop().install()
app.objects = objects
app.executor = ThreadPoolExecutor(16)
app.listen(8080)
asyncio.get_event_loop().run_forever()
# tornado.ioloop.IOLoop.current().start()
# # sys.platform = 'win64'
# # tornado.process.fork_processes(2)
# # httpServer = tornado.httpserver.HTTPServer(app)
# # httpServer.start(5)
# httpServer = tornado.httpserver.HTTPServer(app) # 设置HTTP服务器
# httpServer.listen(8080) # 绑定在指定端口
# httpServer.executor = ThreadPoolExecutor(16)
# tornado.ioloop.IOLoop.current().start() # 启动
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。