You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
748 B

import asyncio
import uvicorn
2 months ago
import TaskManager
import os
from web import create_app
from hypercorn.asyncio import serve
from hypercorn.config import Config
2 months ago
async def run_quart_app():
app = create_app()
config = Config()
config.bind = ["0.0.0.0:5001"]
await serve(app, config)
2 months ago
#对某个目标进行测试
def startWork(targets):
TaskM = TaskManager()
tlist = targets.split(',')
for target in tlist:
TaskM.start_task(target)
# Press the green button in the gutter to run the script.
if __name__ == '__main__':
print(f"Current working directory (run.py): {os.getcwd()}")
#启动web项目
asyncio.run(run_quart_app())
uvicorn.run("run:app", host="0.0.0.0", port=5001, workers=4, reload=True)
2 months ago