Skip to content

Commit

Permalink
hotfix: fix the type err in the run script
Browse files Browse the repository at this point in the history
  • Loading branch information
imagine-hussain committed Jul 3, 2023
1 parent cc74c22 commit ed997de
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions run_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@
import sys
import threading
from subprocess import Popen, check_call
from typing import TextIO

from dotenv import load_dotenv


class LogPipe(threading.Thread):
class LogPipe(threading.Thread, TextIO):
""" boilerplate abstraction for redirecting the logs of a process """
def __init__(self, level):
"""Setup the object with a logger and a loglevel
Expand Down Expand Up @@ -73,8 +74,8 @@ def main():
]
)
# this is actually kooky if you think about it
sys.stdout = LogPipe(logging.INFO) # type: ignore
sys.stderr = LogPipe(logging.ERROR) # type: ignore
sys.stdout = LogPipe(logging.INFO)
sys.stderr = LogPipe(logging.ERROR)
username, password, python_ver = get_backend_env()
base_url = get_frontend_env()
os.system('docker compose run --rm init-mongo')
Expand Down

0 comments on commit ed997de

Please sign in to comment.