Skip to content

Commit 3d714e8

Browse files
committed
changed return type of time_query
1 parent 31f782d commit 3d714e8

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

env/integtest_pg_conn.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@
77
from psycopg.errors import QueryCanceled
88

99
from env.pg_conn import PostgresConn
10-
from util.pg import DEFAULT_POSTGRES_PORT, get_is_postgres_running, get_running_postgres_ports
10+
from util.pg import (
11+
DEFAULT_POSTGRES_PORT,
12+
get_is_postgres_running,
13+
get_running_postgres_ports,
14+
)
1115
from util.workspace import (
1216
DEFAULT_BOOT_CONFIG_FPATH,
1317
DBGymConfig,

env/pg_conn.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,9 @@ def force_statement_timeout(self, timeout_sec: float) -> None:
109109
except QueryCanceled:
110110
retry = True
111111

112-
def time_query(self, query: str, timeout_sec: float = 0) -> tuple[float, bool, Any]:
112+
def time_query(
113+
self, query: str, timeout_sec: float = 0
114+
) -> tuple[float, bool, Optional[dict[str, Any]]]:
113115
"""
114116
Run a query with a timeout. If you want to attach per-query knobs, attach them to the query string itself.
115117
Following Postgres's convention, timeout=0 indicates "disable timeout"

0 commit comments

Comments
 (0)