Interface ManagedAgentContainersOptimizer

  • All Known Implementing Classes:
    ManagedAgentContainersOptimizerImpl

    @Internal
    public interface ManagedAgentContainersOptimizer
    ManagedAgentContainersOptimizer is responsible for determining what elastic images and how many of them need to be started to speed up queue processing. It also checks what elastic instances can be shutdown without impacting the queue processing.
    Author:
    anatoli
    • Method Detail

      • getElasticAgentsToStop

        @NotNull
        @NotNull Collection<RemoteElasticInstance> getElasticAgentsToStop()
        Returns a collection of currently running elastic agents that should be stopped. Current implementation returns the list of elastic instances that - cannot run any of the builds currently in queue - have been idle for longer than ELASTIC_AGENT_IDLE_THRESHOLD - nearing the end of their billing period - didn't have an agent running of them within an hour of startup
        Returns:
        list of elastic instances that cannot run any of the builds currently in queue