Skip to content

Commit

Permalink
Revert "Simplify: 불필요한 로그 제거"
Browse files Browse the repository at this point in the history
This reverts commit fec48fd.
  • Loading branch information
g-hyeong committed Oct 16, 2024
1 parent 0284bef commit eb55353
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions messagequeue/producer/Oasis/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,19 @@ async def crawl():
universal_newlines=True,
)

# # 로그 비동기 출력
# async def stream_Oasis_logs():
# while True:
# line = process.stdout.readline()
# if line:
# print(f"[Oasis Crawl Log] {line.strip()}")
# sys.stdout.flush() # 로그를 즉시 출력
# if not line and process.poll() is not None:
# break
# await asyncio.sleep(0)

# # 로그를 비동기적으로 처리
# await stream_Oasis_logs()
# 로그 비동기 출력
async def stream_Oasis_logs():
while True:
line = process.stdout.readline()
if line:
print(f"[Oasis Crawl Log] {line.strip()}")
sys.stdout.flush() # 로그를 즉시 출력
if not line and process.poll() is not None:
break
await asyncio.sleep(0)

# 로그를 비동기적으로 처리
await stream_Oasis_logs()

# 프로세스 종료 대기
process.wait()
Expand Down

0 comments on commit eb55353

Please sign in to comment.