Add dev option to increase external metadata cache expiration. More logs

This commit is contained in:
Deluan
2023-02-02 16:55:12 -05:00
parent 588ee94f7c
commit ad2ad514b3
4 changed files with 18 additions and 7 deletions
+4 -2
View File
@@ -146,8 +146,10 @@ func (api *Router) routes() http.Handler {
r.Group(func(r chi.Router) {
// configure request throttling
if conf.Server.DevArtworkMaxRequests > 0 {
maxRequests := conf.Server.DevArtworkMaxRequests
r.Use(middleware.ThrottleBacklog(maxRequests, conf.Server.DevArtworkThrottleBacklogLimit,
log.Debug("Subsonic getCoverArt endpoint will be throttled", "maxRequests", conf.Server.DevArtworkMaxRequests,
"backlogLimit", conf.Server.DevArtworkThrottleBacklogLimit, "backlogTimeout",
conf.Server.DevArtworkThrottleBacklogTimeout)
r.Use(middleware.ThrottleBacklog(conf.Server.DevArtworkMaxRequests, conf.Server.DevArtworkThrottleBacklogLimit,
conf.Server.DevArtworkThrottleBacklogTimeout))
}
hr(r, "getCoverArt", api.GetCoverArt)