-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
38 lines (30 loc) · 1.47 KB
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import asyncio
import os.path
import aiohttp
from utils.websocket import WebSocket
from utils.model import database, Task
from utils.logger import logger
ws: WebSocket
async def main():
async with aiohttp.ClientSession(cookie_jar=aiohttp.CookieJar(unsafe=True)) as session:
global ws
ws = WebSocket(session)
await ws.websocket_connect()
if __name__ == '__main__':
logger.info("""
_____ __ _ _ _ _____ _ _
|_ _| / _(_) (_) | / ____| | | (_)
| | _ __ | |_ _ _ __ _| |_ ___ | (___ _ _ _ __ ___ _ __ ___| |_ _ __ _ _ __ __ _
| | | '_ \| _| | '_ \| | __/ _ \ \___ \| | | | '_ \ / _ \ '__/ __| __| '__| | '_ \ / _` |
_| |_| | | | | | | | | | | || __/ ____) | |_| | |_) | __/ | \__ \ |_| | | | | | | (_| |
|_____|_| |_|_| |_|_| |_|_|\__\___| |_____/ \__,_| .__/ \___|_| |___/\__|_| |_|_| |_|\__, |
| | __/ |
|_| |___/
前端:https://github.com/infinite-superstring/ServerManager-UI
后端:https://github.com/infinite-superstring/ServerManager-Panel
节点:https://github.com/infinite-superstring/ServerManager-Node
""")
if not os.path.exists('data'):
os.mkdir('data')
database.create_tables([Task])
asyncio.run(main())