Open lucernae opened 6 years ago
same as #264?
Proposal that I can think of now:
Analysis model should track the current task result state (done) and stacktrace if failed (exception type, trace messages, error message summary)
Check failed task
a. Should implement periodic task check again to check task state. This is because if a task is failed, we can't execute callback to GeoNode.
b. Should implement REST API for task failure callback. This might be more complicated than 2a, because we should implement oauth for communication now. Because the callback will not be via celery. But this is the ideal solution and what we should aim for. We could implement 2a first and use some of the logic to implement 2b.
We should be able to query/retrieve a task progress. This needs fundamental changes in InaSAFE headless. We can't query a running task and asked for intrinsic variable values, so we had to ask Headless to update the progress periodically. This can only happen if InaSAFE supports this. We're going to use analysis progress that is being updated from Qt form in InaSAFE Desktop. Not sure how to achieve this. So, I'll probably need some time for tinkering.
For the web app to query task progress to GeoSAFE, we had to enable web socket. Or plain ajax alternatively, if web socket were not available. So, it's best to start from AJAX first.
Will add more if I had additional proposals in mind.
We have to know why a task is failed and at which steps.