Skip to content

Callback function doesn't trigger after secondary rate limit is hit #9

@johnmcollier

Description

@johnmcollier

Hi,

I have some code that intiializes a go-github client using go-github-ratelimiter, with a custom callback function defined like so:

rateLimiter, err := github_ratelimit.NewRateLimitWaiterClient(tc.Transport, github_ratelimit.WithLimitDetectedCallback(func(cbContext *github_ratelimit.CallbackContext) {
		ctx := *cbContext.UserContext
		// Some other steps
}))
client := github.NewClient(rateLimiter)

But despite using a GitHub token that is secondary rate limited (for content creation), I don't ever see the callback function run.

I'm using github.com/gofri/go-github-ratelimit v1.0.2 and github.com/google/go-github/v41 v41.0.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions