Skip to content
Snippets Groups Projects
Commit 9b3b4943 authored by Nico Vermaas's avatar Nico Vermaas
Browse files

add COLLECT_H5 logic

(including a database change)
parent 68b06ba8
Branches
No related tags found
1 merge request!361SDC-1423 use aggregation strategy
Pipeline #88852 passed
...@@ -186,7 +186,7 @@ def update_processed_and_aggregate(task): ...@@ -186,7 +186,7 @@ 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 the activity is ready to collect H5 data # check if the activity is ready to collect H5 data
if (not activity.is_aggregated and activity.status != 'aggregate'): if (not activity.is_aggregated and activity.status != State.COLLECTING_DATA.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.
if activity.storage_location == "unknown": if activity.storage_location == "unknown":
...@@ -194,7 +194,7 @@ def update_processed_and_aggregate(task): ...@@ -194,7 +194,7 @@ def update_processed_and_aggregate(task):
# this means that its tasks know that they should copy their H5 files to the storage_location # this means that its tasks know that they should copy their H5 files to the storage_location
# (but the tasks cannot do that, the aggregator service does) # (but the tasks cannot do that, the aggregator service does)
activity.status = State.COLLECT_DATA.value activity.status = State.COLLECTING_DATA.value
activity.save() activity.save()
......
...@@ -28,7 +28,7 @@ class State(Enum): ...@@ -28,7 +28,7 @@ class State(Enum):
SUSPENDED = "suspended" SUSPENDED = "suspended"
DISCARDED = "discarded" DISCARDED = "discarded"
FAILED = "failed" FAILED = "failed"
COLLECT_DATA = "collect_data" COLLECTING_DATA = "collecting_data"
VERIFIED_STATUSSES = [State.STORED.value, State.VALIDATED.value, State.SCRUBBED.value, State.PRE_ARCHIVED.value, VERIFIED_STATUSSES = [State.STORED.value, State.VALIDATED.value, State.SCRUBBED.value, State.PRE_ARCHIVED.value,
State.ARCHIVED.value, State.FINISHED.value, State.SUSPENDED.value, State.DISCARDED.value] State.ARCHIVED.value, State.FINISHED.value, State.SUSPENDED.value, State.DISCARDED.value]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment