]> git.ipfire.org Git - pbs.git/commitdiff
jobs: Drop unused add_file() function
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 13 Oct 2022 15:41:18 +0000 (15:41 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 13 Oct 2022 15:41:18 +0000 (15:41 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/buildservice/jobs.py

index 03328a69db2f9130537e515d0ec5fa11fa50fdc1..61cdc772466ff5bb6e3cd200e51d9eb42cd7aeb4 100644 (file)
@@ -416,29 +416,6 @@ class Job(base.DataObject):
                else:
                        return datetime.datetime.utcnow() - self.started_at
 
-       def add_file(self, filename):
-               """
-                       Add the specified file to this job.
-
-                       The file is copied to the right directory by this function.
-               """
-               assert os.path.exists(filename)
-
-               if filename.endswith(".%s" % PACKAGE_EXTENSION):
-                       # It is not allowed to upload packages on test builds.
-                       if self.test:
-                               return
-
-                       # Open package (creates entry in the database)
-                       pkg = self.backend.packages.create(filename)
-
-                       # Move package to the build directory.
-                       pkg.move(os.path.join(self.build.path, self.arch))
-
-                       # Attach the package to this job.
-                       self.db.execute("INSERT INTO jobs_packages(job_id, pkg_id) VALUES(%s, %s)",
-                               self.id, pkg.id)
-
        @property
        def message_recipients(self):
                l = []