Skip to content
Snippets Groups Projects
Commit 3b1df292 authored by Vincent Garonne's avatar Vincent Garonne
Browse files

[RUCIO-2798] Fix ami probe to get version metadata with the size than in the db

parent 5e27b641
No related branches found
No related tags found
No related merge requests found
...@@ -60,8 +60,7 @@ where A.writestatus='valid' and B.identifier = A.NOMENCLATUREFK and B.nomenclatu ...@@ -60,8 +60,7 @@ where A.writestatus='valid' and B.identifier = A.NOMENCLATUREFK and B.nomenclatu
and nomenclaturetemplate in ('project.runNumber.streamName.prodStep.dataType.Version', 'project.datasetNumber.physicsShort.prodStep.dataType.Version')''' and nomenclaturetemplate in ('project.runNumber.streamName.prodStep.dataType.Version', 'project.datasetNumber.physicsShort.prodStep.dataType.Version')'''
for project, naming_convention in session.execute(query): for project, naming_convention in session.execute(query):
try: try:
# regexp = '^(?P<project>%(project)s)\.(?P<run_number>\d+)\.(?P<stream_name>[a-zA-Z0-9\_\-]+)\.(?P<prod_step>[a-zA-Z0-9\_\-]+)\.(?P<datatype>\w+)(?:\.(?P<version>[a-zA-Z\'_\'-.0-9]{1,32}))?$' % locals() regexp = '^(?P<project>%(project)s)\.(?P<run_number>\d+)\.(?P<stream_name>[a-zA-Z0-9\_\-]+)\.(?P<prod_step>[a-zA-Z0-9\_\-]+)\.(?P<datatype>\w+)(?:\.(?P<version>[a-zA-Z0-9\_\-]{1,50}))?$' % locals()
regexp = '^(?P<project>%(project)s)\.(?P<run_number>\d+)\.(?P<stream_name>[a-zA-Z0-9\_\-]+)\.(?P<prod_step>[a-zA-Z0-9\_\-]+)\.(?P<datatype>\w+)(?:\.(?P<version>\w+))?$' % locals()
query = '''MERGE INTO atlas_rucio.naming_conventions D query = '''MERGE INTO atlas_rucio.naming_conventions D
USING (SELECT '%(project)s' as scope, '%(regexp)s' as regexp FROM DUAL) S USING (SELECT '%(project)s' as scope, '%(regexp)s' as regexp FROM DUAL) S
ON (D.scope = S.scope) ON (D.scope = S.scope)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment