duneanalytics / dune-client

A framework for interacting with Dune Analytics' officially supported API service
Apache License 2.0
85 stars 22 forks source link

Adjustable polling frequency as env variable #138

Open JJJJJJJJJJJJJJJl opened 1 day ago

JJJJJJJJJJJJJJJl commented 1 day ago

Reason: When using the client, longer queries will exit with a 429 due to a high number of failed attempts to get a result. Allowing the user to define the poll frequency is beneficial if he's aware that he's running a heavier query.

Still defaults to 1 as it currently is.

bh2smith commented 1 day ago

This is already possible with functions like run_query by passing in your "ping_frequency"

https://github.com/duneanalytics/dune-client/blob/main/dune_client/api/extensions.py

Not sure if it's a great idea to have library constants dynamically loaded. Would love to hear others thoughts...

Cc @msf