Skip to content

Commit 226a27d

Browse files
[cuegui] Bug fix missing jobs on MonitorJobs (#1312)
* [cuegui] Bug fix missing jobs on MonitorJobs When the option group dependent is checked, jobs without dependency are being omitted. * [cuegui] Bug fix missing jobs on MonitorJobs - Remove dependent if it has the same name as the job. This avoids missing jobs on MonitorJobs. Remove the parent job is necessary to avoid remove the parent job and all the dependents when del self.__load[j] is called - Use list comprehension to remove dependent if it has the same name as the job - List comprehension avoid many nested blocks and follow the project code style * [cuegui] Bug fix when unmonitor finished jobs with dependents - AbstractTreeWidget.py > _removeItem(): Check if object ID exists before delete it * Merge master into fix_missing_jobs_on_monitor_jobs * [cuegui] Bug fix missing jobs on MonitorJobs - When the option group dependent is checked, jobs without dependency are omitted. - Code refactoring
1 parent a94393a commit 226a27d

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

cuegui/cuegui/JobMonitorTree.py

+8
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,14 @@ def addJob(self, job, timestamp=None, loading_from_config=False):
285285
dep = self.__menuActions.jobs(
286286
).getRecursiveDependentJobs([newJobObj],
287287
active_only=active_only)
288+
289+
# Remove dependent if it has the same name as the job
290+
# - This avoids missing jobs on MonitorJobs
291+
# - Remove the parent job is necessary to avoid remove
292+
# the parent job and all the dependents
293+
# in the step 2 below
294+
dep = [j for j in dep if j.data.name != newJobObj.data.name]
295+
288296
self.__dependentJobs[jobKey] = dep
289297
# we'll also store a reversed dictionary for
290298
# dependencies with the dependent as key and the main

0 commit comments

Comments
 (0)