Skip to content

Commit 7aed980

Browse files
committed
Add configuration options to skip specified workflows and filesets in JobCreatorPoller
1 parent b7869d0 commit 7aed980

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

src/python/WMComponent/JobCreator/JobCreatorPoller.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,10 @@ def __init__(self, config):
338338
self.agentName = getattr(config.Agent, 'hostName', '')
339339
self.glideinLimits = getattr(config.JobCreator, 'GlideInRestriction', None)
340340

341+
# Load workflows/filesets to skip
342+
self.skipWorkflows = getattr(config.JobCreator, 'skipWorkflows', [])
343+
self.skipFilesets = getattr(config.JobCreator, 'skipFilesets', [])
344+
341345
try:
342346
self.jobCacheDir = getattr(config.JobCreator, 'jobCacheDir',
343347
os.path.join(config.JobCreator.componentDir, 'jobCacheDir'))
@@ -443,6 +447,15 @@ def pollSubscriptions(self):
443447
wmbsSubscription['workflow'] = workflow
444448
wmWorkload = retrieveWMSpec(workflow=workflow)
445449

450+
# Check if we should skip this workflow or fileset
451+
if workflow.name in self.skipWorkflows:
452+
logging.info("Skipping workflow %s as configured in skipWorkflows", workflow.name)
453+
continue
454+
455+
if wmbsSubscription and wmbsSubscription.get('fileset') and wmbsSubscription['fileset'].name in self.skipFilesets:
456+
logging.info("Skipping fileset %s as configured in skipFilesets", wmbsSubscription['fileset'].name)
457+
continue
458+
446459
if not workflow.task or not wmWorkload:
447460
# Then we have a problem
448461
# We NEED a sandbox

0 commit comments

Comments
 (0)