mirror of
https://github.com/akvorado/akvorado.git
synced 2025-12-11 22:14:02 +01:00
outlet/kafka: rename startScaler to runScaler
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
Update Nix dependency hashes / Update dependency hashes (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
Update Nix dependency hashes / Update dependency hashes (push) Has been cancelled
There is not stopScaler and it's not like we can start several of them.
This commit is contained in:
@@ -135,7 +135,7 @@ func (c *realComponent) Start() error {
|
||||
|
||||
// StartWorkers will start the initial workers. This should only be called once.
|
||||
func (c *realComponent) StartWorkers(workerBuilder WorkerBuilderFunc) error {
|
||||
c.workerRequestChan = c.startScaler()
|
||||
c.workerRequestChan = c.runScaler()
|
||||
c.workerBuilder = workerBuilder
|
||||
for range c.config.MinWorkers {
|
||||
if err := c.startOneWorker(); err != nil {
|
||||
|
||||
@@ -76,8 +76,8 @@ func (s *scalerState) nextWorkerCount(request ScaleRequest, minWorkers, maxWorke
|
||||
return next
|
||||
}
|
||||
|
||||
// startScaler starts the automatic scaling loop
|
||||
func (c *realComponent) startScaler() chan<- ScaleRequest {
|
||||
// runScaler starts the automatic scaling loop
|
||||
func (c *realComponent) runScaler() chan<- ScaleRequest {
|
||||
ch := make(chan ScaleRequest, c.config.MaxWorkers)
|
||||
down := rate.Sometimes{Interval: c.config.WorkerDecreaseRateLimit}
|
||||
up := rate.Sometimes{Interval: c.config.WorkerIncreaseRateLimit}
|
||||
|
||||
Reference in New Issue
Block a user