Skip to content

Commit

Permalink
[cuegui] Remove check for source waiting frames on redirect (#1648)
Browse files Browse the repository at this point in the history
Checking for if the source job has waiting frames makes no sense as the
job is giving up its resources. This unnecessary check was preventing
operations from redirecting resources from jobs that were fully booked
but still running.
  • Loading branch information
DiegoTavares authored Jan 28, 2025
1 parent 49b6b32 commit 34fd37e
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions cuegui/cuegui/Redirect.py
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,7 @@ def __isBurstSafe(self, alloc, procs, show):
@classmethod
def __isAllowed(cls, procs, targetJob):
"""Checks if the follow criteria are met to allow redirect to target job:
- if source/target job have waiting frames
- if target job have waiting frames
- if target job hasn't reached maximum cores
- check if adding frames will push target job over it's max cores
Expand All @@ -627,19 +627,10 @@ def __isAllowed(cls, procs, targetJob):
targetJob.maxCores())

# Case 2: 1. Check target job for waiting frames
# 2. Check source procs for waiting frames
if allowed and targetJob.waitingFrames() <= 0:
allowed = False
errMsg = "Target job %s has no waiting frames" % targetJob.name()

if allowed:
for proc in procs:
job = proc.getJob()
if job.waitingFrames() <= 0:
allowed = False
errMsg = "Source job %s has no waiting frames" % job.name()
break

# Case 3: Check if each proc or summed up procs will
# push targetJob over it's max cores
if allowed:
Expand Down

0 comments on commit 34fd37e

Please sign in to comment.