Update app.py
Browse files
app.py
CHANGED
|
@@ -10,19 +10,17 @@ def start_backup_service():
|
|
| 10 |
text=True,
|
| 11 |
bufsize=1
|
| 12 |
)
|
| 13 |
-
# Stream logs in real-time
|
| 14 |
for line in proc.stdout:
|
| 15 |
print("[Backup]", line.strip())
|
| 16 |
|
| 17 |
-
print("Starting Restorer.")
|
| 18 |
subprocess.run(["python3", "/restore.py"], check=True)
|
| 19 |
-
print("
|
| 20 |
|
| 21 |
-
print("Starting Auto-Backup Service.")
|
| 22 |
-
|
| 23 |
-
thr.start()
|
| 24 |
|
| 25 |
-
print("Starting
|
| 26 |
subprocess.run([
|
| 27 |
"code-server",
|
| 28 |
"--bind-addr", "0.0.0.0:7860",
|
|
|
|
| 10 |
text=True,
|
| 11 |
bufsize=1
|
| 12 |
)
|
|
|
|
| 13 |
for line in proc.stdout:
|
| 14 |
print("[Backup]", line.strip())
|
| 15 |
|
| 16 |
+
print("Starting Restorer...")
|
| 17 |
subprocess.run(["python3", "/restore.py"], check=True)
|
| 18 |
+
print("Restore Completed.")
|
| 19 |
|
| 20 |
+
print("Starting Auto-Backup Service...")
|
| 21 |
+
threading.Thread(target=start_backup_service, daemon=True).start()
|
|
|
|
| 22 |
|
| 23 |
+
print("Starting VSCode server...")
|
| 24 |
subprocess.run([
|
| 25 |
"code-server",
|
| 26 |
"--bind-addr", "0.0.0.0:7860",
|