Skip to content

Commit

Permalink
feat(runtime/lava): Add priority for manual submits
Browse files Browse the repository at this point in the history
Manually submitted jobs need slightly better priority to complete
faster.

Signed-off-by: Denys Fedoryshchenko <[email protected]>
  • Loading branch information
nuclearcat committed Oct 15, 2024
1 parent e27ba56 commit 510a989
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions kernelci/runtime/lava.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,13 @@ def _get_priority(self, job):
prio_range = self.config.priority_max - self.config.priority_min
prio_min = self.config.priority_min
priority = int((priority * prio_range / 100) + prio_min)
# Increase the priority for jobs submitted by humans
node = job.node
submitter = node.get('submitter')
if submitter and submitter != 'service:pipeline':
priority = priority + 1
if priority > self.config.priority_max:
priority = self.config.priority_max
return priority

def get_params(self, job, api_config=None):
Expand Down

0 comments on commit 510a989

Please sign in to comment.