Rename concurrency to workers

This commit is contained in:
DarthSim
2023-08-15 19:54:42 +03:00
parent e172b14377
commit 07e34a45f2
9 changed files with 26 additions and 17 deletions

View File

@@ -37,10 +37,10 @@ var (
func initProcessingHandler() {
if config.RequestsQueueSize > 0 {
queueSem = semaphore.New(config.RequestsQueueSize + config.Concurrency)
queueSem = semaphore.New(config.RequestsQueueSize + config.Workers)
}
processingSem = semaphore.New(config.Concurrency)
processingSem = semaphore.New(config.Workers)
vary := make([]string, 0)
@@ -282,7 +282,7 @@ func handleProcessing(reqID string, rw http.ResponseWriter, r *http.Request) {
}
}
// The heavy part start here, so we need to restrict concurrency
// The heavy part start here, so we need to restrict workers number
var processingSemToken *semaphore.Token
func() {
defer metrics.StartQueueSegment(ctx)()