From: Michael Tremer Date: Wed, 5 Feb 2025 09:41:01 +0000 (+0000) Subject: jobs: Update message to abort X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1967476ea8a70861315404b5d905759fedda0fa5;p=pbs.git jobs: Update message to abort Signed-off-by: Michael Tremer --- diff --git a/src/buildservice/jobs.py b/src/buildservice/jobs.py index f5fd608b..ce5dc1f3 100644 --- a/src/buildservice/jobs.py +++ b/src/buildservice/jobs.py @@ -849,11 +849,13 @@ class Job(database.Base, database.BackendMixin, database.SoftDeleteMixin): Aborts the job """ # Tell the builder to abort the job - if self.connection: - await self.connection.write_message({ - "type" : "abort", - "data" : {}, + try: + await self.builder.send_message({ + "job_id" : "%s" % self.uuid, + "command" : "abort", }) + except builders.BuilderNotOnlineError as e: + pass # Mark as finished self.finished_at = sqlalchemy.func.current_timestamp()