Skip to content

Commit

Permalink
update queue sort
Browse files Browse the repository at this point in the history
  • Loading branch information
calvinp0 committed Jan 28, 2024
1 parent 87b78ef commit b9b40b7
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
Expand Up @@ -1360,7 +1360,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)
Expand Down

0 comments on commit b9b40b7

Please sign in to comment.