Skip to content

Commit e945932

Browse files
committed
process deployment fixed
1 parent 6c8bd79 commit e945932

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

app/deployer.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@ def on_created(self, event):
199199
Typical use cases:
200200
- Reacting to new script files by updating network configurations and executing them automatically.
201201
"""
202+
print(f"[FER] File created: {event.src_path}")
202203
if event.is_directory:
203204
return
204205
src_path = event.src_path
@@ -233,6 +234,7 @@ def on_deleted(self, event):
233234
Typical use cases:
234235
- Cleaning up running processes when associated script files are removed.
235236
"""
237+
print("[FER] File deleted: %s" % event.src_path)
236238
if event.is_directory:
237239
return
238240
src_path = event.src_path
@@ -272,7 +274,7 @@ def run_script(self, script):
272274
try:
273275
print(f"Running script: {script}")
274276
if script.endswith(".sh"):
275-
result = subprocess.run(["bash", script], capture_output=True, text=True)
277+
result = subprocess.Popen(["bash", script], stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)
276278
print(f"Script output:\n{result.stdout}")
277279
if result.stderr:
278280
logging.error(f"Script error:\n{result.stderr}")

0 commit comments

Comments
 (0)