Skip to content

Commit

Permalink
Fixing Lite version without DB (#29)
Browse files Browse the repository at this point in the history
* lite version without DB

* lite version without DB

* back to test
  • Loading branch information
lAmeR1 authored May 23, 2023
1 parent 4b821f6 commit f06c382
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
from helper import get_kas_market_data
from server import app, kaspad_client

IS_SQL_DB_CONFIGURED = os.getenv("SQL_URI") is not None

print(
f"Loaded: {get_balance}, {get_utxos}, {get_blocks}, {get_blockdag}, {get_circulating_supply}, "
f"{get_kaspad_info}, {get_network}, {get_marketcap}, {get_hashrate}, {get_blockreward}"
Expand All @@ -35,7 +37,8 @@
@app.on_event("startup")
async def startup():
# create db if needed
await create_all(drop=False)
if IS_SQL_DB_CONFIGURED:
await create_all(drop=False)
# get kaspad
await get_kas_market_data()

Expand Down

0 comments on commit f06c382

Please sign in to comment.