Skip to content
Snippets Groups Projects

update unit-tests branch with latest from master

Merged Nico Vermaas requested to merge master into unit-tests
11 files
+ 520
88
Compare changes
  • Side-by-side
  • Inline
Files
11
@@ -191,8 +191,8 @@ def update_processed_and_aggregate(task):
@@ -191,8 +191,8 @@ def update_processed_and_aggregate(task):
if (task.workflow.aggregation_strategy == AggregationStrategy.COLLECT_H5.value):
if (task.workflow.aggregation_strategy == AggregationStrategy.COLLECT_H5.value):
# check if there is already a storage_location, if not, add it.
# check if there is already a storage_location, if not, add it... unless the value is 'unknown'
if not activity.storage_location:
if not activity.storage_location or activity.storage_location == 'unknown':
# for this aggregation_strategy, the activity storage_location is the workdir of the aggregation task
# for this aggregation_strategy, the activity storage_location is the workdir of the aggregation task
activity.create_storage_location()
activity.create_storage_location()
@@ -218,11 +218,16 @@ def update_processed_and_aggregate(task):
@@ -218,11 +218,16 @@ def update_processed_and_aggregate(task):
# only save when changed
# only save when changed
if activity.is_processed != current_is_processed:
if activity.is_processed != current_is_processed:
# if the whole activity has become processed, then set the status of this activity to 'AGGREGATE'
# if the whole activity has become 'processed',
# unless it was already aggregated
# and there is an aggregation strategy defined
if (activity.is_processed & non_discarded_found):
# and this activity is not yet 'aggregated'
if not (activity.is_aggregated):
# then set the status of this activity to 'AGGREGATE'
activity.status = State.AGGREGATE.value
if (task.workflow.aggregation_strategy != AggregationStrategy.NONE.value):
 
 
if (activity.is_processed & non_discarded_found):
 
 
if not (activity.is_aggregated):
 
activity.status = State.AGGREGATE.value
activity.save()
activity.save()
Loading