Skip to content

Commit

Permalink
prodanaly: job prodsourcelabel precedence over queue prodsourcelabel
Browse files Browse the repository at this point in the history
  • Loading branch information
fbarreir committed Dec 3, 2019
1 parent 054179c commit fae333b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion pandaharvester/harvestercore/queue_config_mapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,15 @@ def is_no_heartbeat_status(self, status):
return status in self.get_no_heartbeat_status()

# get prodSourceLabel
def get_source_label(self):
def get_source_label(self, job_type=None):
# if queue is in test status, only submit workers for HC jobs
if self.queueStatus == 'test':
return 'test'

# grandly unified queues: prodsourcelabel in job has precedence over queue prodsourcelabel
if job_type == 'user':
return job_type

return self.prodSourceLabel

# set unique name
Expand Down
2 changes: 1 addition & 1 deletion pandaharvester/harvestersubmitter/htcondor_submitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ def make_a_jdl(workspec, template, n_core_per_node, log_dir, panda_queue_name, e
# decide prodSourceLabel
pilot_opt_tuple = _get_prodsourcelabel_pilotypeopt_piloturlstr(workspec.pilotType, pilot_version)
if pilot_opt_tuple is None:
prod_source_label = harvester_queue_config.get_source_label()
prod_source_label = harvester_queue_config.get_source_label(workspec.jobType)
pilot_type_opt = workspec.pilotType
pilot_url_str = ''
else:
Expand Down

0 comments on commit fae333b

Please sign in to comment.