MKE0108 commited on
Commit
25d356d
·
verified ·
1 Parent(s): a78369a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -14,7 +14,9 @@ def bot_run():
14
  status = status_file.read().strip()
15
 
16
  # 如果 Status.txt 的值是 "1",則運行 bot_main.py
17
- if status == "1":
 
 
18
  os.system("python bot_main.py")
19
 
20
  @app.get("/")
 
14
  status = status_file.read().strip()
15
 
16
  # 如果 Status.txt 的值是 "1",則運行 bot_main.py
17
+ if status == "0":
18
+ with open("Status.txt", "w") as status_file:
19
+ status_file.write("1")
20
  os.system("python bot_main.py")
21
 
22
  @app.get("/")