Skip to content

Commit

Permalink
backend: use --priority option for copr-rpmbuild if specified
Browse files Browse the repository at this point in the history
  • Loading branch information
nikromen committed May 19, 2023
1 parent 68bb81c commit 8979db9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions backend/copr_backend/background_worker_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,9 @@ def _start_remote_build(self):
command += " --srpm --task-url {task_url} --detached"
else:
command += " --task-url {task_url} --chroot {chroot} --detached"
if self.job.priority is not None:
command += f"--priority {self.job.priority}"

command = command.format(task_url=self.job.task_url,
chroot=self.job.chroot)

Expand Down
2 changes: 2 additions & 0 deletions backend/copr_backend/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ def __init__(self, task_data, worker_opts):
self.results = None
self.appstream = None

self.priority = None

# TODO: validate update data
for key, val in task_data.items():
key = str(key)
Expand Down

0 comments on commit 8979db9

Please sign in to comment.