Skip to content

Commit

Permalink
Check statement timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
bram-vdberg committed Dec 13, 2024
1 parent 5f66926 commit 4ad5435
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Binary file removed src/.pg_client.py.swp
Binary file not shown.
4 changes: 4 additions & 0 deletions src/pg_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from pandas import DataFrame, Series
from sqlalchemy import create_engine
from sqlalchemy.engine import Engine
from sqlalchemy import text

from src.logger import set_log
from src.utils.query_file import open_query
Expand Down Expand Up @@ -67,6 +68,9 @@ def get_solver_rewards(

# Here, we use the convention that we run the prod query for the first connection
# and the barn query to all other connections
log.info("Checking statement timeout")
_res = self.exec_query(query=text("SHOW statement_timeout;")).scalar()
log.info(f"Statement timeout for database is: {_res}")
log.info("Running prod query for first connection (in get_solver_rewards)")
results.append(
self.exec_query(query=batch_reward_query_prod, engine=self.connections[0])
Expand Down

0 comments on commit 4ad5435

Please sign in to comment.