Skip to content

Commit

Permalink
tests-scan: prioritise /devel scenario
Browse files Browse the repository at this point in the history
Add back a very simple priority scheme: any test that hsa '/devel' in
the name runs first.  We want to do this because the '/devel' scenarios
take longer, so we want to get them running ASAP.
  • Loading branch information
allisonkarlitskaya committed Jun 27, 2024
1 parent 3482f47 commit 36bc0a6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests-scan
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,10 @@ def is_internal_context(context: str) -> bool:


def queue_test(entry: QueueEntry, dq: distributed_queue.DistributedQueue) -> None:
queue = 'rhel' if is_internal_context(entry['job']['context']) else 'public'
properties = pika.BasicProperties(priority=distributed_queue.BASELINE_PRIORITY)
context = entry['job']['context']
queue = 'rhel' if is_internal_context(context) else 'public'
priority = distributed_queue.MAX_PRIORITY if '/devel' in context else distributed_queue.BASELINE_PRIORITY
properties = pika.BasicProperties(priority=priority)
dq.channel.basic_publish('', queue, json.dumps(entry), properties=properties)
logging.info("Published job: %s", json.dumps(entry["job"]))

Expand Down

0 comments on commit 36bc0a6

Please sign in to comment.