MCPcopy
hub / github.com/eth0izzle/shhgit / GetClient

Method GetClient

core/session.go:69–85  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

67}
68
69func (s *Session) GetClient() *GitHubClientWrapper {
70 sleepTime := 0 * time.Second
71
72 for _, client := range s.Clients {
73 if client.RateLimitedUntil != 0 {
74 sleepTime = client.RateLimitedUntil
75 continue
76 }
77
78 return client
79 }
80
81 s.Log.Warn("All GitHub tokens exchausted/rate limited. Sleeping until %s", sleepTime)
82 time.Sleep(sleepTime)
83
84 return s.GetClient()
85}
86
87func (s *Session) InitThreads() {
88 if *s.Options.Threads == 0 {

Callers 3

GetRepositoriesFunction · 0.80
GetGistsFunction · 0.80
GetRepositoryFunction · 0.80

Calls 1

WarnMethod · 0.80

Tested by

no test coverage detected