Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
CTADIRAC
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Tomas Bylund
CTADIRAC
Commits
4029a1cf
Commit
4029a1cf
authored
4 years ago
by
Johan Bregeon
Browse files
Options
Downloads
Patches
Plain Diff
use setInputMetaQuery
parent
a1251a3c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Interfaces/test/prod5_evndisp_launcher.py
+6
-6
6 additions, 6 deletions
Interfaces/test/prod5_evndisp_launcher.py
with
6 additions
and
6 deletions
Interfaces/test/prod5_evndisp_launcher.py
+
6
−
6
View file @
4029a1cf
...
...
@@ -32,7 +32,7 @@ from DIRAC.Interfaces.API.Dirac import Dirac
from
CTADIRAC.Core.Utilities.tool_box
import
get_dataset_MQ
def
submit_trans
(
job
,
trans_name
,
mqJson
,
group_size
):
def
submit_trans
(
job
,
trans_name
,
input_meta_query
,
group_size
):
"""
Create a transformation executing the job workflow
"""
DIRAC
.
gLogger
.
notice
(
'
submit_trans : %s
'
%
trans_name
)
...
...
@@ -48,7 +48,8 @@ def submit_trans(job, trans_name, mqJson, group_size):
trans
.
setLongDescription
(
"
Prod5 EventDisplay processing
"
)
# mandatory
trans
.
setBody
(
job
.
workflow
.
toXML
())
trans
.
setGroupSize
(
group_size
)
trans
.
setFileMask
(
mqJson
)
# catalog query is defined here
trans
.
setInputMetaQuery
(
input_meta_query
)
# trans.setFileMask(mqJson) # catalog query is defined here
result
=
trans
.
addTransformation
()
# transformation is created here
if
not
result
[
'
OK
'
]:
return
result
...
...
@@ -127,15 +128,14 @@ def launch_job(args):
BL-4LSTs05MSTs-MSTN BL-4LSTs09MSTs-MSTF
\
BL-4LSTs09MSTs-MSTN BL-4LSTs15MSTs-MSTF
\
BL-4LSTs15MSTs-MSTN
'
DIRAC
.
gLogger
.
notice
(
'
LaPalma layouts:
\n
'
,
job
.
layout_list
)
DIRAC
.
gLogger
.
notice
(
'
LaPalma layouts:
\n
'
,
job
.
layout_list
.
split
()
)
elif
output_meta_data
[
'
site
'
]
==
'
Paranal
'
:
DIRAC
.
gLogger
.
notice
(
'
Paranal layouts:
\n
'
,
job
.
layout_list
)
DIRAC
.
gLogger
.
notice
(
'
Paranal layouts:
\n
'
,
job
.
layout_list
.
split
()
)
job
.
ts_task_id
=
'
@{JOB_ID}
'
# dynamic
job
.
setupWorkflow
(
debug
=
False
)
job
.
setType
(
'
EvnDispProd5
'
)
# mandatory *here*
result
=
submit_trans
(
job
,
trans_name
,
json
.
dumps
(
input_meta_query
),
group_size
)
result
=
submit_trans
(
job
,
trans_name
,
input_meta_query
,
group_size
)
else
:
DIRAC
.
gLogger
.
error
(
'
1st argument should be the job mode: WMS or TS,
\n\
not %s
'
%
mode
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment