Skip to content

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
  • Loading branch information
phenobarbital committed Nov 18, 2023
1 parent b8ec444 commit 8272d82
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions examples/test_pg.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"password": "12345678",
"host": "127.0.0.1",
"port": "5432",
"database": "navigator_dev",
"database": "navigator",
"DEBUG": True,
}

Expand All @@ -21,15 +21,16 @@
db = loop.run_until_complete(pool.acquire())
print('Is Connected: ', db.is_connected())

sql = "SELECT * FROM troc.query_util WHERE query_slug = 'walmart_stores'"
# sql = "SELECT * FROM troc.query_util WHERE query_slug = 'walmart_stores'"

async def connect(c):
async with await c.connection() as conn:
print('Connection: ', conn)
result, error = await conn.test_connection()
print(result, error)
start = datetime.now()
result, error = await conn.query(sql)
sql = 'REFRESH MATERIALIZED VIEW epson.vw_form_data;'
result, error = await conn.execute(sql)
exec_time = (datetime.now() - start).total_seconds()

if not error:
Expand Down

0 comments on commit 8272d82

Please sign in to comment.