civisanalytics / civis-python

Civis API Python Client
BSD 3-Clause "New" or "Revised" License
34 stars 26 forks source link

[CIVIS-1949] PERF more efficient polling at future objects #492

Closed jacksonlee-civis closed 5 months ago

jacksonlee-civis commented 5 months ago

This pull request makes polling at future objects more efficient, in that a short-running job's future.result() should return faster than before.

Before this PR, the default polling interval was a constant of 15 seconds. After this PR, the default polling interval starts at 1 second, increases geometrically for subsequent polls, and is capped at a maximum of 15 seconds. If the user provides a number to the polling_interval argument, the polling interval will be a constant of this number (so no change from before this PR).