amor71 / LiuAlgoTrader

Framework for algorithmic trading

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rename this here and in `setup_db`

github-actions opened this issue · comments

Rename this here and in setup_db

# TODO Rename this here and in `setup_db`

    print("files loaded successfully.")
    print(f"running docker-compose from within {db_location}:")
    _extracted_from_setup_db_69(db_location, " && docker-compose up -d")
    if restore_sample_db:
        print("waiting for database to complete setup. 2 minutes")
        time.sleep(120)
        print("restoring sample database")
        _extracted_from_setup_db_69(
            db_location,
            " && docker exec -i pg-docker psql -q -U liu -W liu liu < liu_dump.sql",
        )
    print()
    print("check deployment using `\psql -h localhost -p 5400 -U liu`")


# TODO Rename this here and in `setup_db`
def _extracted_from_setup_db_69(db_location, arg1):
    to_run = f"cd {db_location}{arg1}"
    print("> ", to_run)
    os.system(to_run)


def setup_samples(
    samples_location: str, user: str, passwd: str, db: str
) -> None:
    try:
        _extracted_from_setup_samples_5(samples_location, user, passwd, db)
    except Exception as e:
        print(f"Something went wrong:{e}")
        print(

94e1c20a07ce5a496a58a6105e5ba9b70494e699

Stale issue message