muccg / rdrf

The Rare Disease Registry Framework (RDRF) is an open source tool for the creation of web-based patient registries.
GNU Affero General Public License v3.0
15 stars 8 forks source link

Pull_proms is broken for multi registry site #911

Closed mouneyrac closed 5 years ago

mouneyrac commented 5 years ago

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.

mouneyrac commented 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.