mirror of
https://github.com/akvorado/akvorado.git
synced 2025-12-11 22:14:02 +01:00
outlet/kafka: log a message when increasing/decreasing workers
Some checks failed
CI / 🤖 Check dependabot status (push) Has been cancelled
CI / 🐧 Test on Linux (${{ github.ref_type == 'tag' }}, misc) (push) Has been cancelled
CI / 🐧 Test on Linux (coverage) (push) Has been cancelled
CI / 🐧 Test on Linux (regular) (push) Has been cancelled
CI / ❄️ Build on Nix (push) Has been cancelled
CI / 🍏 Build and test on macOS (push) Has been cancelled
CI / 🧪 End-to-end testing (push) Has been cancelled
CI / 🔍 Upload code coverage (push) Has been cancelled
CI / 🔬 Test only Go (push) Has been cancelled
CI / 🔬 Test only JS (${{ needs.dependabot.outputs.package-ecosystem }}, 20) (push) Has been cancelled
CI / 🔬 Test only JS (${{ needs.dependabot.outputs.package-ecosystem }}, 22) (push) Has been cancelled
CI / 🔬 Test only JS (${{ needs.dependabot.outputs.package-ecosystem }}, 24) (push) Has been cancelled
CI / ⚖️ Check licenses (push) Has been cancelled
CI / 🐋 Build Docker images (push) Has been cancelled
CI / 🐋 Tag Docker images (push) Has been cancelled
CI / 🚀 Publish release (push) Has been cancelled
Some checks failed
CI / 🤖 Check dependabot status (push) Has been cancelled
CI / 🐧 Test on Linux (${{ github.ref_type == 'tag' }}, misc) (push) Has been cancelled
CI / 🐧 Test on Linux (coverage) (push) Has been cancelled
CI / 🐧 Test on Linux (regular) (push) Has been cancelled
CI / ❄️ Build on Nix (push) Has been cancelled
CI / 🍏 Build and test on macOS (push) Has been cancelled
CI / 🧪 End-to-end testing (push) Has been cancelled
CI / 🔍 Upload code coverage (push) Has been cancelled
CI / 🔬 Test only Go (push) Has been cancelled
CI / 🔬 Test only JS (${{ needs.dependabot.outputs.package-ecosystem }}, 20) (push) Has been cancelled
CI / 🔬 Test only JS (${{ needs.dependabot.outputs.package-ecosystem }}, 22) (push) Has been cancelled
CI / 🔬 Test only JS (${{ needs.dependabot.outputs.package-ecosystem }}, 24) (push) Has been cancelled
CI / ⚖️ Check licenses (push) Has been cancelled
CI / 🐋 Build Docker images (push) Has been cancelled
CI / 🐋 Tag Docker images (push) Has been cancelled
CI / 🚀 Publish release (push) Has been cancelled
This commit is contained in:
@@ -98,6 +98,7 @@ func (c *realComponent) startScaler() chan<- ScaleRequest {
|
||||
targetWorkers := state.nextWorkerCount(request, c.config.MinWorkers, c.config.MaxWorkers)
|
||||
|
||||
if targetWorkers > currentWorkers {
|
||||
c.r.Info().Msgf("increase number of workers from %d to %d", currentWorkers, targetWorkers)
|
||||
for i := currentWorkers; i < targetWorkers; i++ {
|
||||
if err := c.startOneWorker(); err != nil {
|
||||
c.r.Err(err).Msg("cannot spawn a new worker")
|
||||
@@ -115,6 +116,7 @@ func (c *realComponent) startScaler() chan<- ScaleRequest {
|
||||
targetWorkers := state.nextWorkerCount(request, c.config.MinWorkers, c.config.MaxWorkers)
|
||||
|
||||
if targetWorkers < currentWorkers {
|
||||
c.r.Info().Msgf("decrease number of workers from %d to %d", currentWorkers, targetWorkers)
|
||||
for i := currentWorkers; i > targetWorkers; i-- {
|
||||
c.stopOneWorker()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user