GIScience / orstools-qgis-plugin

Plugin for QGIS with a set of tools to use openrouteservice API´s, based on openstreetmap
https://plugins.qgis.org/plugins/ORStools/
MIT License
91 stars 31 forks source link

Add provider-specific timeout #160

Closed koebi closed 2 years ago

koebi commented 2 years ago

This is based on #121 by @jannefleischer.

It addresses the requested changes from said PR. Most notably, it drops a bunch of int()-conversions, since it adds a QIntValidator for the timeout-field. Timeout will default to 60s if not set.

Fixes #122

TheGreatRefrigerator commented 2 years ago

Rebased on master. @koebi could you take another look at this please? I've removed some of the many "default to 60 seconds" assignments and tried to put them only in the neccessary places.

Also restructured a bit and introduced a range limit of up to 1h. Do you think this is appropriate? We could allow for up to 24h to avoid the whole issues with the quota reset, but i'd rather adjust the whole retry logic for that, which currently randomly retries instead of checking for the actual request response and react accordingly.

koebi commented 2 years ago

Looks good to me :) I'm pretty sure a 1 hour timeout is appropriate - if anyone runs into problems and wants more, they'll either fix it themselves or let us know, I hope^^