nens / threedi-api-qgis-client

3Di Models & Simulations plugin
https://plugins.lizard.net/
Other
2 stars 0 forks source link

Sqlite upload not completed when trying to commit revision #459

Open leendertvanwolfswinkel opened 1 year ago

leendertvanwolfswinkel commented 1 year ago

In some rare cases, the request to commit a revision is done just before the sqlite is registered as uploaded, which leads to the following error:

Error: (400)
Reason: Bad Request
HTTP response headers: HTTPHeaderDict({'server': 'openresty/1.15.8.3', 'date': 'Tue, 25 Apr 2023 08:01:32 GMT', 'content-type': 'application/json', 'content-length': '44', 'vary': 'Accept, Origin', 'allow': 'POST, OPTIONS', 'x-frame-options': 'DENY', 'x-content-type-options': 'nosniff', 'strict-transport-security': 'max-age=63072000', 'referrer-policy': 'strict-origin-when-cross-origin', 'x-xss-protection': '1'})
HTTP response body: {"detail":"The sqlite file is not uploaded"}

Can we somehow check the status of the sqlite upload before committing the revision? Or simply wait 1 second after failure to commit and then try again? Or perhaps progressive waiting e.g. wait 1, 2, 5, 10 seconds?