Skip to content

Commit

Permalink
after review comment remove
Browse files Browse the repository at this point in the history
  • Loading branch information
MindHunter86 committed Aug 11, 2024
1 parent a4e80f1 commit cc57f30
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 23 deletions.
18 changes: 0 additions & 18 deletions internal/anilibria/randomizer.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,6 @@ func (m *Randomizer) Bootstrap() {
m.destroy()
}

// func (m *Randomizer) IsReady() bool {
// return m.isReady()
// }

func (m *Randomizer) Randomize() string {
return m.randomRelease()
}
Expand Down Expand Up @@ -123,20 +119,6 @@ func (m *Randomizer) destroy() {
}
}

// func (m *Randomizer) setReady(ready bool) {
// m.mu.Lock()
// defer m.mu.Unlock()

// m.ready = ready
// }

// func (m *Randomizer) isReady() bool {
// m.mu.RLock()
// defer m.mu.RUnlock()

// return m.ready
// }

func (m *Randomizer) peekReleaseKeyChunks() (_ int, e error) {
var res string
if res, e = m.rclient.Get(m.rctx, m.releasesKey).Result(); e == redis.Nil {
Expand Down
7 changes: 2 additions & 5 deletions internal/service/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,12 +184,9 @@ func (m *Service) fiberRouterInitialization() {
// step1 - validate request
apiv1 := m.fb.Group("/public/api", m.proxy.MiddlewareValidation)

// step2 - reroute random() queries:
//

// step3 - check cache availability and try to respond with it
// step2 - check cache availability and try to respond with it
apiv1.Use(skip.New(m.proxy.HandleProxyToCache, m.proxy.IsRequestCached))

// step4 - proxy request to upstream
// step3 - proxy request to upstream
apiv1.Use(m.proxy.HandleProxyToDst)
}

0 comments on commit cc57f30

Please sign in to comment.