fix(master_ai_sync): merge stdout and stderr to parse total_emails count from logs
This commit is contained in:
parent
3f426b8f3c
commit
af496b79a6
1 changed files with 3 additions and 3 deletions
|
|
@ -133,11 +133,11 @@ def update_email_audit_stats():
|
|||
|
||||
def run_step(name, cmd):
|
||||
log.info(f"--- Step: {name} ---")
|
||||
result = subprocess.run(cmd, capture_output=True, text=True)
|
||||
result = subprocess.run(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, text=True)
|
||||
if result.returncode != 0:
|
||||
log.error(f"Step {name} FAILED!")
|
||||
log.error(result.stderr)
|
||||
return False, result.stderr
|
||||
log.error(result.stdout)
|
||||
return False, result.stdout
|
||||
log.info(f"Step {name} completed.")
|
||||
return True, result.stdout
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue