Geek7 commited on
Commit
64814f3
·
verified ·
1 Parent(s): 14e8a28

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -0
app.py CHANGED
@@ -1,7 +1,11 @@
1
  # app.py
2
 
3
  import os
 
4
 
5
  if __name__ == "__main__":
 
 
 
6
  # Run the Flask app using Gunicorn
7
  os.system("gunicorn -w 4 -b 0.0.0.0:7860 myapp:myapp") # 4 worker processes
 
1
  # app.py
2
 
3
  import os
4
+ import subprocess
5
 
6
  if __name__ == "__main__":
7
+ # Run awake.py in the background
8
+ subprocess.Popen(["python", "wk.py"]) # Start awake.py
9
+
10
  # Run the Flask app using Gunicorn
11
  os.system("gunicorn -w 4 -b 0.0.0.0:7860 myapp:myapp") # 4 worker processes