Summary
Simplify Google Pub/Sub retries and restrict them to transient errors, specifically removing retries for `NotFound` errors (these were triggering many unneeded retries on Google Cloud Run). This also stops the retry schedule being proportional to the timeout for waiting for an answer to a question, which could lead to very long retry schedules for large timeouts (e.g. for questions that involve long analyses).
<!--- SKIP AUTOGENERATED NOTES --->
Contents
Enhancements
- [x] Add `timeout` parameter to `Service.ask`
Fixes
- [x] Only retry transient errors in Google Pub/Sub `Service` and `GooglePubSubHandler`