Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -1,14 +1,7 @@
|
|
1 |
import subprocess
|
2 |
from fastapi import FastAPI
|
3 |
-
from concurrent.futures import ThreadPoolExecutor
|
4 |
|
5 |
-
|
6 |
-
|
7 |
-
def start_worker():
|
8 |
-
subprocess.run(["python3", "TimeStampBuddy/cron_processor.py"])
|
9 |
-
|
10 |
-
executor = ThreadPoolExecutor(max_workers=1)
|
11 |
-
executor.submit(start_worker)
|
12 |
|
13 |
@app.get("/")
|
14 |
def greet_json():
|
|
|
1 |
import subprocess
|
2 |
from fastapi import FastAPI
|
|
|
3 |
|
4 |
+
subprocess.Popen(["python3", "TimeStampBuddy/cron_processor.py"])
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
|
6 |
@app.get("/")
|
7 |
def greet_json():
|