]> git.ipfire.org Git - pbs.git/commitdiff
builders: Drop sync with AWS
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 2 Jun 2023 11:25:52 +0000 (11:25 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 2 Jun 2023 11:25:52 +0000 (11:25 +0000)
This does nothing apart from logging things.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/buildservice/builders.py
src/web/__init__.py

index 9860376d1918f70ccc8223eda1b9b5c8cb93e14e..52944ba74f07b84e46a4a161563aad1a5db3d23f 100644 (file)
@@ -103,19 +103,6 @@ class Builders(base.Object):
 
                        yield builder
 
-       async def sync(self, *args, **kwargs):
-               """
-                       Synchronize any state with AWS
-               """
-               log.info("Syncing state with AWS")
-
-               # Sync all builders
-               async with asyncio.TaskGroup() as tasks:
-                       for builder in self:
-                               tasks.create_task(
-                                       builder.sync(),
-                               )
-
        async def autoscale(self, wait=False):
                """
                        This method performs two tasks:
@@ -598,21 +585,6 @@ class Builder(base.DataObject):
                if self.instance_id:
                        return self.backend.aws.ec2.Instance(self.instance_id)
 
-       async def sync(self):
-               log.info("Syncing AWS state for %s" % self)
-
-               if not self.instance:
-                       log.debug("%s does not have an instance ID" % self)
-                       return
-
-               # This callback is being executed in a separate thread
-               # because boto3 is not thread-safe
-               def callback():
-                       log.debug("%s is currently in state: %s" % (self, self.instance.state))
-
-               # Launch in a separate thread
-               await asyncio.to_thread(callback)
-
        async def is_running(self):
                """
                        Returns True if this builder is currently running
index f9435396f2730452901346c621417df416647cd4..6be6c04e150470e40c598c864ea7b0e3e7cb339e 100644 (file)
@@ -239,7 +239,6 @@ class Application(tornado.web.Application):
 
                # Launch some initial tasks
                self.backend.run_task(self.backend.users.generate_vapid_keys)
-               self.backend.run_task(self.backend.builders.sync)
                self.backend.run_task(self.backend.builders.autoscale)
 
                # Regularly check the mirrors