@@ -152,7 +152,7 @@ def refresh(self):
152152 slist = opencue .api .getJobNames ()
153153 slist .sort ()
154154
155- self .__c = QtWidgets .QCompleter (slist , self )
155+ self .__c = QtWidgets .QCompleter (list ( slist ) , self )
156156 self .__c .setCaseSensitivity (QtCore .Qt .CaseInsensitive )
157157 self .setCompleter (self .__c )
158158
@@ -411,7 +411,7 @@ class RedirectWidget(QtWidgets.QWidget):
411411 """
412412
413413 HEADERS = ["Name" , "Cores" , "Memory" , "PrcTime" , "Group" , "Service" ,
414- "Job Cores" , "Pending " , "LLU" , "Log" ]
414+ "Job Cores" , "Waiting Frames " , "LLU" , "Log" ]
415415
416416 def __init__ (self , parent = None ):
417417 QtWidgets .QWidget .__init__ (self , parent )
@@ -604,7 +604,7 @@ def __isBurstSafe(self, alloc, procs, show):
604604 @classmethod
605605 def __isAllowed (cls , procs , targetJob ):
606606 """Checks if the follow criteria are met to allow redirect to target job:
607- - if source/target job have pending frames
607+ - if source/target job have waiting frames
608608 - if target job hasn't reached maximum cores
609609 - check if adding frames will push target job over it's max cores
610610
@@ -626,18 +626,18 @@ def __isAllowed(cls, procs, targetJob):
626626 targetJob .coresReserved (),
627627 targetJob .maxCores ())
628628
629- # Case 2: 1. Check target job for pending frames
630- # 2. Check source procs for pending frames
629+ # Case 2: 1. Check target job for waiting frames
630+ # 2. Check source procs for waiting frames
631631 if allowed and targetJob .waitingFrames () <= 0 :
632632 allowed = False
633- errMsg = "Target job %s has no pending ( waiting) frames" % targetJob .name ()
633+ errMsg = "Target job %s has no waiting frames" % targetJob .name ()
634634
635635 if allowed :
636636 for proc in procs :
637637 job = proc .getJob ()
638638 if job .waitingFrames () <= 0 :
639639 allowed = False
640- errMsg = "Source job %s has no pending ( waiting) frames" % job .name ()
640+ errMsg = "Source job %s has no waiting frames" % job .name ()
641641 break
642642
643643 # Case 3: Check if each proc or summed up procs will
@@ -808,21 +808,26 @@ def update(self):
808808 if proc .data .group_name not in groupFilter :
809809 continue
810810
811- name = proc .data .name .split ("/" )[0 ]
812- lluTime = cuegui .Utils .getLLU (proc )
813- job = proc .getJob ()
814- logLines = cuegui .Utils .getLastLine (proc .data .log_path ) or ""
815-
816- if name not in hosts :
817- cue_host = opencue .api .findHost (name )
818- hosts [name ] = {
819- "host" : cue_host ,
820- "procs" : [],
821- "mem" : cue_host .data .idle_memory ,
822- "cores" : int (cue_host .data .idle_cores ),
823- "time" : 0 ,
824- "ok" : False ,
825- 'alloc' : cue_host .data .alloc_name }
811+ # pylint: disable=broad-except
812+ try :
813+ name = proc .data .name .split ("/" )[0 ]
814+ lluTime = cuegui .Utils .getLLU (proc )
815+ job = proc .getJob ()
816+ logLines = cuegui .Utils .getLastLine (proc .data .log_path ) or ""
817+
818+ if name not in hosts :
819+ cue_host = opencue .api .findHost (name )
820+ hosts [name ] = {
821+ "host" : cue_host ,
822+ "procs" : [],
823+ "mem" : cue_host .data .idle_memory ,
824+ "cores" : int (cue_host .data .idle_cores ),
825+ "time" : 0 ,
826+ "ok" : False ,
827+ 'alloc' : cue_host .data .alloc_name }
828+ except Exception :
829+ # Ignore dangling procs (not bound to a job through a VirtualProc)
830+ continue
826831
827832 host = hosts [name ]
828833 if host ["ok" ]:
@@ -835,7 +840,7 @@ def update(self):
835840 host ["llu" ] = cuegui .Utils .numFormat (lluTime , "t" )
836841 host ["log" ] = logLines
837842 host ['job_cores' ] = job .data .job_stats .reserved_cores
838- host ['waiting' ] = job .pendingFrames () or 0
843+ host ['waiting' ] = job .waitingFrames () or 0
839844
840845 if host ["cores" ] >= self .__controls .getCores () and \
841846 host ["cores" ] <= self .__controls .getMaxCores () and \
0 commit comments