@@ -19,7 +21,6 @@ for data_ingestion in portal_catalog(**catalog_kw):
'reference':data_ingestion.getReference()}
invalidate=True
iflen(portal_catalog(**catalog_kw))>0:
context.logEntry("Data Ingestion %s is old but it has related data ingestions that are not, so split ingestion is still in course. It won't be invalidated."%data_ingestion.getId())
invalidate=False
ifinvalidate:
...
...
@@ -33,11 +34,9 @@ for data_ingestion in portal_catalog(**catalog_kw):
data_stream.invalidate()
except:
context.logEntry("[WARNING] Could not invalidate data stream '%s', it was already invalidated or draft"%data_stream.getId())
context.logEntry("[ERROR] Error creating Data Analysis for Data Ingestion '%s' (ID: %s): %s"%(data_ingestion.getReference(),data_ingestion.getId(),str(e)))
context.logEntry("Chunks of split ingestion where appended into Data Stream %s. Reference: %s. Corresponding Data Ingestion stopped."%(full_data_stream.getId(),full_data_stream.getReference()))
exceptExceptionase:
context.logEntry("ERROR appending split data streams for ingestion: %s - reference: %s."%(data_ingestion.getId(),data_ingestion.getReference()))
context.logEntry("[ERROR] Data Ingestion reference is not well formated")
context.logEntry("[ERROR] Data Ingestion reference parameter for ingestionReferenceExists script is not well formated")
raiseValueError("Data Ingestion reference is not well formated")
# check if there are started ingestions for this reference
...
...
@@ -41,8 +39,7 @@ try:
returnTRUE
else:
# previous ingestion was interrumped
context.log("[WARNING] User has restarted an interrumpted ingestion for reference %s."%data_ingestion.getReference())
context.log("[WARNING] Previous split ingestions for reference %s will be discarted and full ingestion restarted."%data_ingestion.getReference())
log(''.join(["[WARNING] User has restarted an interrumpted ingestion for reference ",data_ingestion.getReference(),". Previous split ingestions will be discarted and full ingestion restarted."]))