From: Michael Tremer Date: Thu, 13 Oct 2022 15:41:18 +0000 (+0000) Subject: jobs: Drop unused add_file() function X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=35a8d9be84db862b1b027da9571ddcc68a5e2bba;p=pbs.git jobs: Drop unused add_file() function Signed-off-by: Michael Tremer --- diff --git a/src/buildservice/jobs.py b/src/buildservice/jobs.py index 03328a69..61cdc772 100644 --- a/src/buildservice/jobs.py +++ b/src/buildservice/jobs.py @@ -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 = []