hazel icon indicating copy to clipboard operation
hazel copied to clipboard

Throw an error if `INTERVAL` env variable is below 1 minute

Open zeke opened this issue 7 years ago • 6 comments

It appears that hazel is making unauthenticated requests to the GitHub API.. is that correct?

If so, a running instance will quickly go over its unauthenticated request limit.

zeke avatar Aug 16 '17 17:08 zeke

Check the INTERVAL env variable here. What we can do is throw an error if people chose a lower interval than 1m or 2m (60 reqs per hour are allowed).

leo avatar Aug 16 '17 17:08 leo

So.. unauthenticated requests then, right?

zeke avatar Aug 16 '17 17:08 zeke

@zeke Correct. All unauthenticated. That's what makes Hazel so fast and powerful: It only abstracts the necessary. If you need server-side caching / private repos, there's Nuts... 😊

leo avatar Aug 16 '17 17:08 leo

I see. So hazel will only make a request to the GitHub API every INTERVAL minute(s), even though apps will be asking hazel for that info much more frequently.

Does every Now app get its own IP address?

zeke avatar Aug 16 '17 19:08 zeke

I see. So hazel will only make a request to the GitHub API every INTERVAL minute(s), even though apps will be asking hazel for that info much more frequently.

Correct.

Does every Now app get its own IP address?

Depends. Sometimes they're on the same IP.

leo avatar Aug 16 '17 20:08 leo

I ask because unauthenticated GitHub API requests are tallied by IP. It might be worth defaulting to a longer interval to reduce the likelihood of contention across apps.

zeke avatar Aug 16 '17 21:08 zeke