Skip to content

Commit

Permalink
update queue sort
Browse files Browse the repository at this point in the history
calvinp0 committed Jan 14, 2024
1 parent b5760bc commit d0e1eb2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion arc/job/adapter.py
Original file line number Diff line number Diff line change
@@ -1356,7 +1356,10 @@ def troubleshoot_queue(self) -> bool:
filtered_queues = {queue_name: walltime for queue_name, walltime in queues.items() if convert_to_hours(walltime) >= self.max_job_time}

# Now we sort the queues by walltime, and choose the one with the longest walltime.
sorted_queues = sorted(filtered_queues.items(), key=lambda x: convert_to_hours(x[1]), reverse=True)
#sorted_queues = sorted(filtered_queues.items(), key=lambda x: convert_to_hours(x[1]), reverse=True)
# Sort queue time from shortest to longest
sorted_queues = sorted(filtered_queues.items(), key=lambda x: convert_to_hours(x[1]), reverse=False)

self.queue = sorted_queues[0][0]
if self.queue not in self.attempted_queues:
self.attempted_queues.append(self.queue)

0 comments on commit d0e1eb2

Please sign in to comment.