This is an automated email from the ASF dual-hosted git repository.

abeizn pushed a commit to branch fix#5659
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git


The following commit(s) were added to refs/heads/fix#5659 by this push:
     new 2acf3b80d fix: db_url add tls=skip-verify
2acf3b80d is described below

commit 2acf3b80d93c0871497cb749684a6843bb0169d5
Author: abeizn <[email protected]>
AuthorDate: Mon Sep 25 17:26:58 2023 +0800

    fix: db_url add tls=skip-verify
---
 backend/python/pydevlake/pydevlake/ipc.py | 3 +++
 backend/server/services/locking.go        | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/backend/python/pydevlake/pydevlake/ipc.py 
b/backend/python/pydevlake/pydevlake/ipc.py
index ee308189d..18a6a7322 100644
--- a/backend/python/pydevlake/pydevlake/ipc.py
+++ b/backend/python/pydevlake/pydevlake/ipc.py
@@ -131,6 +131,9 @@ def create_db_engine(db_url) -> Engine:
         del connect_args['parseTime']
     if 'loc' in connect_args:
         del connect_args['loc']
+    if 'tls' in connect_args:
+        del connect_args['tls']
+        connect_args['ssl'] = {'verify_cert': 'False'}
     try:
         engine = create_engine(base_url, connect_args=connect_args)
         tables = SubtaskRun.metadata.tables
diff --git a/backend/server/services/locking.go 
b/backend/server/services/locking.go
index 6a74ad4da..1adc48dd5 100644
--- a/backend/server/services/locking.go
+++ b/backend/server/services/locking.go
@@ -59,7 +59,7 @@ func lockDatabase() {
        // 3. update the record
        select {
        case <-c:
-       case <-time.After(3 * time.Second):
+       case <-time.After(10 * time.Second):
                panic(fmt.Errorf("locking _devlake_locking_stub timeout, the 
database might be locked by another devlake instance"))
        }
 }

Reply via email to