Skip to content

Commit 18c715e

Browse files
authored
Merge pull request #10 from Synicix/master
Fix disconnect issue with datajoint
2 parents 4293902 + 0a6e4c7 commit 18c715e

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

dj_gui_api_server/DJConnector.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ def list_schemas(jwt_payload):
4141

4242
# Attempt to connect return true if successful, false is failed
4343
schemas = dj.list_schemas()
44-
dj.conn.connection.close()
4544
return schemas
4645

4746
"""
@@ -82,8 +81,7 @@ def list_tables(jwt_payload, schema_name):
8281
tables_dict_list['part_tables'].append(DJConnector.snake_to_camel_case(table_name_parts[1]) + '.' + DJConnector.snake_to_camel_case(table_name_parts[2]))
8382
else:
8483
print(table_name + ' is of unknown table type')
85-
86-
dj.conn.connection.close()
84+
8785
return tables_dict_list
8886

8987
"""
@@ -101,6 +99,7 @@ def set_datajoint_config(jwt_payload):
10199
dj.config['database.user'] = jwt_payload['username']
102100
dj.config['database.password'] = jwt_payload['password']
103101

102+
dj.conn(reset=True)
104103
"""
105104
Helper method for converting snake to camel case
106105

0 commit comments

Comments
 (0)