OasisLMF / OasisPlatform

Loss modelling platform.
BSD 3-Clause "New" or "Revised" License
42 stars 16 forks source link

Fix V2 workflow - set analysis end status. #1050

Open sambles opened 1 month ago

sambles commented 1 month ago

Issue Description

For input generation the READY status indicates an execution has completed. At the moment this is called in the 2nd last sub-task of the celery canvas when storing the result. https://github.com/OasisLMF/OasisPlatform/blob/20b0aa391335a420bf4dcdd70caa8e02b771fb60/src/server/oasisapi/analyses/v2_api/tasks.py#L484

However there is still the cleanup_input_generation to complete: https://github.com/OasisLMF/OasisPlatform/blob/20b0aa391335a420bf4dcdd70caa8e02b771fb60/src/model_execution_worker/distributed_tasks.py#L723-L743

The last task of the canvas is the correct place to set the analysis state