This adds a new config option "refresh_interval" which controls the number of seconds between periodically refreshing all the credentials, instead of making it always be one minute. When set to zero, it disables periodic refreshing and makes it be only on demand. I want it for disabling periodic refresh (because I don't think it scales, and because my refresh token are set to not expire for 30 days), but I thought other people might want to keep refreshing with a longer interval so I thought this was a good way to make it flexible.
I wanted to write some tests for this but I'm having trouble figuring out how TestPeriodicRefresh() works. Maybe you could explain it.
This adds a new config option "refresh_interval" which controls the number of seconds between periodically refreshing all the credentials, instead of making it always be one minute. When set to zero, it disables periodic refreshing and makes it be only on demand. I want it for disabling periodic refresh (because I don't think it scales, and because my refresh token are set to not expire for 30 days), but I thought other people might want to keep refreshing with a longer interval so I thought this was a good way to make it flexible.
I wanted to write some tests for this but I'm having trouble figuring out how TestPeriodicRefresh() works. Maybe you could explain it.