]> git.ipfire.org Git - pbs.git/commitdiff
hub: Perform autoscale algorithm on start
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 20 Jun 2022 17:19:25 +0000 (17:19 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 20 Jun 2022 17:19:25 +0000 (17:19 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/hub/__init__.py
src/hub/queue.py

index e99d91de329bff4fee37837d950aab12fa1e6ee0..f972c5187fc8ee385e995b3efe02412ed22d7b47 100644 (file)
@@ -64,6 +64,7 @@ class Application(tornado.web.Application):
 
                # Perform some initial tasks
                self._run_task(self.backend.builders.sync)
+               self._run_task(self.backend.builders.autoscale)
 
        def _run_task(self, callback, t=None):
                """
index 1a8054e2a806de6f0db73e276725caaf029564df..f2d42ce90c4504e1d8aa068b5abd68b317454cc0 100644 (file)
@@ -34,9 +34,6 @@ async def dispatch_jobs(backend):
                Will be called regularly and will dispatch any pending jobs to any
                available builders
        """
-       # Perform any autoscaling action
-       await backend.builders.autoscale()
-
        log.debug("Dispatching jobs...")
 
        # Exit if there are no builders connected