We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f6253cd commit 91cd477Copy full SHA for 91cd477
1 file changed
backend/apps/db/db.py
@@ -52,10 +52,12 @@ def get_uri_from_config(type: str, conf: DatasourceConf) -> str:
52
return db_url
53
54
55
-def get_engine(ds: CoreDatasource, timeout: int = 30) -> Engine:
+def get_engine(ds: CoreDatasource, timeout: int = 0) -> Engine:
56
conf = DatasourceConf(**json.loads(aes_decrypt(ds.configuration))) if ds.type != "excel" else get_engine_config()
57
if conf.timeout is None:
58
conf.timeout = timeout
59
+ if timeout > 0:
60
+ conf.timeout = timeout
61
if ds.type == "pg" and (conf.dbSchema is not None and conf.dbSchema != ""):
62
engine = create_engine(get_uri(ds),
63
connect_args={"options": f"-c search_path={urllib.parse.quote(conf.dbSchema)}",
0 commit comments