Commit 110b0c03 authored by Levin Zimmermann's avatar Levin Zimmermann

erp5_wendelin: Garbage collect ZBigArray when DataAnalysis is reprocessed

This helps to save storage space when the refresh workflow is called [1].

[1] https://lab.nexedi.com/nexedi/wendelin/blob/04787344/bt5/erp5_wendelin/SkinTemplateItem/portal_skins/erp5_wendelin/ERP5Site_executeDataAnalysisList.py#L32-37
parent e856de9d
......@@ -12,6 +12,7 @@ for line in context.objectValues(portal_type="Data Analysis Line"):
if line.getResourceValue().getPortalType() == "Data Product" and line.getQuantity() == 1:
data_array = line.getAggregateDataArrayValue()
if data_array is not None:
context.Base_deleteZBigArray(data_array.getArray())
data_array.setArray(None)
data_array.setStartDate(None)
data_array.manage_delObjects(list(data_array.keys()))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment