cacode commited on
Commit
8bdd797
·
verified ·
1 Parent(s): 609affe

Delete app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -45
app.py DELETED
@@ -1,45 +0,0 @@
1
- from fastapi import FastAPI
2
- from fastapi.responses import HTMLResponse
3
- import threading
4
-
5
- from scheduler import scheduler_loop
6
-
7
- app = FastAPI()
8
-
9
- @app.on_event("startup")
10
- def start_scheduler():
11
- t = threading.Thread(target=scheduler_loop, daemon=True)
12
- t.start()
13
-
14
- @app.get("/", response_class=HTMLResponse)
15
- def index():
16
- try:
17
- logs = open("runtime.log", "r", encoding="utf-8").read()[-20000:]
18
- except:
19
- logs = ""
20
-
21
- return f"""
22
- <html>
23
- <head>
24
- <meta http-equiv="refresh" content="5">
25
- <title>Gemini Auto Register</title>
26
- <style>
27
- body {{
28
- background:#0b0b0b;
29
- color:#00ff9c;
30
- font-family: monospace;
31
- padding:20px;
32
- }}
33
- pre {{
34
- white-space: pre-wrap;
35
- font-size: 13px;
36
- }}
37
- </style>
38
- </head>
39
- <body>
40
- <h2>Gemini Business 自动注册</h2>
41
- <p>每 3 小时自动创建 5 个账号</p>
42
- <pre>{logs}</pre>
43
- </body>
44
- </html>
45
- """