Skip to content
This repository was archived by the owner on Sep 12, 2024. It is now read-only.

Commit 73d1a81

Browse files
committed
add skip rucio wf in closor and injector
1 parent 294f147 commit 73d1a81

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

Unified/closor.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ def spawn_harvesting(url, wfi , in_full):
151151
def closor(url, specific=None, options=None):
152152
if userLock(): return
153153
mlock = moduleLock()
154-
if mlock(): return
154+
if mlock() and not options.manual: return
155155
up = componentInfo(soft=['mcm','wtc'])
156156
if not up.check(): return
157157

@@ -207,7 +207,7 @@ def rank( wfn ):
207207

208208
for iwfo,wfo in enumerate(wfs):
209209
if specific and not specific in wfo.name: continue
210-
210+
if not options.manual and 'rucio' in (wfo.name).lower(): continue
211211
closers.append( CloseBuster(
212212
wfo = wfo,
213213
url = url,
@@ -655,6 +655,7 @@ def close(self):
655655
parser.add_option('--force', help="Force pushing the workflow through", default=False,action='store_true')
656656
parser.add_option('--announce', help="Announce the outputs that should be announced", default=False,action='store_true')
657657
parser.add_option('--threads',help='Number of threads for processing workflows',default=5, type=int)
658+
parser.add_option('-m','--manual', help='Manual close, bypassing lock check',action='store_true',dest='manual',default=False)
658659
(options,args) = parser.parse_args()
659660

660661
spec=None

Unified/injector.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ def injector(url, options, specific):
4242
for wf in workflows:
4343
if specific and not specific in wf: continue
4444

45+
if not options.manual and 'rucio' in wf.lower(): continue
46+
4547
exists = session.query(Workflow).filter(Workflow.name == wf ).first()
4648
if not exists:
4749
wfi = workflowInfo(url, wf)
@@ -143,6 +145,7 @@ def injector(url, options, specific):
143145
for wf in session.query(Workflow).filter(Workflow.status == 'trouble').all():
144146
print wf.name
145147
if specific and not specific in wf.name: continue
148+
if not options.manual and 'rucio' in wf.lower(): continue
146149
print wf.name
147150
wfi = workflowInfo(url, wf.name )
148151
wl = wfi.request #getWorkLoad(url, wf.name)

0 commit comments

Comments
 (0)