Skip to content

Commit 601b3fc

Browse files
reconfigure python print to flush upon each print statement to enforce sequential logging with terraform cli
1 parent 0293cf8 commit 601b3fc

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

infrastructure/deploy.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,14 @@
33
import argparse
44
import os
55
import subprocess
6+
import sys
67
import time
78

89
from deploy_modules import docker, terraform
910

11+
# Force line buffering for logs so that print statements and cli output print sequentially
12+
sys.stdout.reconfigure(line_buffering=True)
13+
1014
# CONFIGS
1115
PRIVATE_KEY_FILE_PATH = "scpca-portal-key.pem"
1216
# TODO: Convert to argument

0 commit comments

Comments
 (0)