]> git.ipfire.org Git - pbs.git/commitdiff
jobs: Drop unused control connection stuff
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 5 Feb 2025 09:42:34 +0000 (09:42 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 5 Feb 2025 09:42:34 +0000 (09:42 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/buildservice/jobs.py

index ce5dc1f30c83d5652e27d24e2a3cf23e25123f10..a3eab9bb433d44dc0deca0b2e346379b6d352c5b 100644 (file)
@@ -38,8 +38,6 @@ JobPackage = sqlalchemy.Table(
 )
 
 class Jobs(base.Object):
-       connections = {}
-
        def init(self):
                # Setup queue
                self.queue = Queue(self.backend)
@@ -688,43 +686,6 @@ class Job(database.Base, database.BackendMixin, database.SoftDeleteMixin):
                        },
                })
 
-       def connected(self, connection):
-               """
-                       Called when a builder has connected
-               """
-               # Replace any old connections
-               if self.connection:
-                       log.warning("Closing connection to %s because it is being replaced" % self)
-
-                       # Close the previous connection
-                       self.connection.close(code=1000, reason="Replaced by a new connection")
-
-               log.debug("Connection opened for %s" % self)
-
-               # Store the connection
-               self.backend.jobs.connections[self.uuid] = connection
-
-       def disconnected(self):
-               """
-                       Called when a builder has disconnected
-               """
-               log.debug("%s has disconnected" % self)
-
-               try:
-                       del self.backend.jobs.connections[self.uuid]
-               except IndexError:
-                       pass
-
-       @property
-       def connection(self):
-               """
-                       Easy access to the control connection to a builder
-               """
-               try:
-                       return self.backend.jobs.connections[self.uuid]
-               except KeyError:
-                       pass
-
        async def finished(self, success, packages=None, message=None, logfile=None):
                """
                        Called when this job has finished