Spaces:
Sleeping
Sleeping
fixing connection issue
Browse files- lambda_function.py +2 -2
lambda_function.py
CHANGED
@@ -103,8 +103,8 @@ def lambda_handler(periods_30m):
|
|
103 |
df_write = pd.DataFrame.from_dict({k:[v] for k, v in blob.items()})
|
104 |
cursor = connection.cursor()
|
105 |
insert_dataframe_to_sql('results', df_write, cursor)
|
106 |
-
cursor.close()
|
107 |
-
connection.close()
|
108 |
|
109 |
return blob
|
110 |
|
|
|
103 |
df_write = pd.DataFrame.from_dict({k:[v] for k, v in blob.items()})
|
104 |
cursor = connection.cursor()
|
105 |
insert_dataframe_to_sql('results', df_write, cursor)
|
106 |
+
# cursor.close()
|
107 |
+
# connection.close()
|
108 |
|
109 |
return blob
|
110 |
|