Skip to content

Commit bdc3adf

Browse files
authored
Merge pull request #698 from tmaeno/master
to create pmerge jobs even when tasks throttled
2 parents 68c43d7 + c887820 commit bdc3adf

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

pandajedi/jedibrokerage/AtlasAnalJobBroker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ def doBrokerage(self, taskSpec, cloudName, inputChunk, taskParamMap):
161161
totalJobStat = self.taskBufferIF.countJobsPerTarget_JEDI(taskSpec.origUserName, True)
162162
self.set_task_common("totalJobStat", totalJobStat)
163163
# check total to cap
164-
if totalJobStat:
164+
if totalJobStat and not inputChunk.isMerging:
165165
if taskSpec.workingGroup:
166166
gdp_token_jobs = "CAP_RUNNING_GROUP_JOBS"
167167
gdp_token_cores = "CAP_RUNNING_GROUP_CORES"

pandaserver/taskbuffer/JobSpec.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -729,15 +729,15 @@ def setScoutJobFlag(self):
729729
# check if scout job
730730
def isScoutJob(self):
731731
return self.check_special_handling("scoutJob")
732-
732+
733733
# set build job flag
734734
def set_build_job_flag(self):
735735
self.set_special_handling("buildJob")
736736

737737
# check if build job
738738
def is_build_job(self):
739739
return self.check_special_handling("buildJob")
740-
740+
741741
# set pmerge job flag
742742
def set_pmerge_job_flag(self):
743743
self.set_special_handling("pmergeJob")
@@ -795,7 +795,7 @@ def useInputPrestaging(self):
795795
def to_dict_advanced(self, add_extra_info=False):
796796
"""
797797
Convert the JobSpec to a dictionary, including file information and optionally extra info.
798-
798+
799799
:param add_extra_info: If True, include extra info such as job duration and extended prodSourceLabel. Default is False.
800800
:return: A dictionary representation of the JobSpec
801801
"""
@@ -819,11 +819,11 @@ def to_dict_advanced(self, add_extra_info=False):
819819
# Add extra info if requested
820820
if add_extra_info:
821821
# Calculate job duration if startTime and endTime are available
822-
if self.startTime and self.endTime:
823-
ret["jobDuration"] = (self.endTime - self.startTime).total_seconds()
822+
if ret["startTime"] and ret["endTime"]:
823+
ret["jobDuration"] = (ret["endTime"] - ret["startTime"]).total_seconds()
824824
else:
825825
ret["jobDuration"] = None
826-
826+
827827
# Add extended prodSourceLabel info
828828
label = self.prodSourceLabel
829829
if self.is_build_job():

0 commit comments

Comments
 (0)