Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -7,6 +7,7 @@ import sys
|
|
| 7 |
app = Flask(__name__)
|
| 8 |
|
| 9 |
watcher_process = None
|
|
|
|
| 10 |
|
| 11 |
def start_watcher():
|
| 12 |
global watcher_process
|
|
@@ -20,6 +21,14 @@ def start_watcher():
|
|
| 20 |
)
|
| 21 |
print("watcher.py γθ΅·εγγΎγγ")
|
| 22 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
|
| 24 |
#----------
|
| 25 |
|
|
|
|
| 7 |
app = Flask(__name__)
|
| 8 |
|
| 9 |
watcher_process = None
|
| 10 |
+
dmsender_process = None
|
| 11 |
|
| 12 |
def start_watcher():
|
| 13 |
global watcher_process
|
|
|
|
| 21 |
)
|
| 22 |
print("watcher.py γθ΅·εγγΎγγ")
|
| 23 |
|
| 24 |
+
if dmsender_process is None or dmsender_process.poll() is not None:
|
| 25 |
+
dmsender_process = subprocess.Popen(
|
| 26 |
+
[sys.executable, "dmsender.py"],
|
| 27 |
+
stdout=sys.stdout,
|
| 28 |
+
stderr=sys.stderr,
|
| 29 |
+
env=os.environ,
|
| 30 |
+
)
|
| 31 |
+
print("dmsender.py γθ΅·εγγΎγγ")
|
| 32 |
|
| 33 |
#----------
|
| 34 |
|