Closed mouneyrac closed 5 years ago
Solution: 1- move the automatic delete feature from the promsdownload web service to a new cleanup web service 2- in the pull_proms script, once the surveys are retrieved (once per registry) call the new cleanup web service with the successfull download surveys (pass the id that the promsdownload may already or not - to be checked - returns).
This behaviour will avoid to lose survey answers when a crash happens on the client or network.
pull_proms code logic ignore the fact that the /api/proms/v1/promsdownload ws return all registry and delete all the result. As pull_proms tries to loop however all registry and execute the ws for each of them, only the first registry of the loop works. The other ones will be ignored as the proms have been deleted by the first ws call.