RKuttruff commented on code in PR #228:
URL: 
https://github.com/apache/incubator-sdap-nexus/pull/228#discussion_r1105299244


##########
analysis/webservice/algorithms/doms/ResultsStorage.py:
##########
@@ -177,21 +180,43 @@ def __insertResult(self, execution_id, primaryId, result, 
batch, insertStatement
 
         dataMap = self.__buildDataMap(data_dict)
         result_id = uuid.uuid4()
-        batch.add(insertStatement, (
-            result_id,
-            execution_id,
-            result["id"],
-            primaryId,
-            result["lon"],
-            result["lat"],
-            result["source"],
-            result["time"],
-            result["platform"] if "platform" in result else None,
-            result["device"] if "device" in result else None,
-            dataMap,
-            1 if primaryId is None else 0,
-            result["depth"]
-        ))
+
+        try:
+            batch.add(insertStatement, (
+                result_id,
+                execution_id,
+                result["id"],
+                primaryId,
+                result["lon"],
+                result["lat"],
+                result["source"],
+                result["time"],
+                result["platform"] if "platform" in result else None,
+                result["device"] if "device" in result else None,
+                dataMap,
+                1 if primaryId is None else 0,
+                result["depth"]
+            ))
+        except:

Review Comment:
   The many error log statements were for me debugging this issue and can be 
removed/reduced.
   Adding it to the batch prepares the SQL statement but doesn't execute it. It 
is in this preparation that the error occurred iirc.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@sdap.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to