Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Tape RSE attribute from ddm_quota to dm_weight in MSOutput #11940

Merged
merged 1 commit into from
Mar 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions src/python/WMCore/MicroService/MSOutput/MSOutput.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
"""
File : MSOtput.py
File : MSOutput.py

Description: MSOutput.py class provides the whole logic behind
the Output data placement in WMCore MicroServices.
"""

# futures
from __future__ import division, print_function
from future.utils import viewitems

# system modules
import time
from pymongo import IndexModel, ReturnDocument, errors
Expand Down Expand Up @@ -88,7 +84,7 @@ def __init__(self, msConfig, mode, logger=None):
self.msConfig.setdefault("enableRelValCustodial", False)
self.msConfig.setdefault("excludeDataTier", [])
self.msConfig.setdefault("rucioAccount", 'wmcore_transferor')
self.msConfig.setdefault("rucioRSEAttribute", 'ddm_quota')
self.msConfig.setdefault("rucioRSEAttribute", 'dm_weight')
self.msConfig.setdefault("rucioDiskRuleWeight", 'ddm_quota')
self.msConfig.setdefault("rucioTapeExpression", 'rse_type=TAPE\cms_type=test')
# This Disk expression wil target all real DISK T1 and T2 RSEs
Expand Down Expand Up @@ -240,7 +236,7 @@ def _executeProducer(self, reqStatus, summary):

# filter out documents already produced
finalRequests = []
for reqName, reqData in viewitems(requestRecords):
for reqName, reqData in requestRecords.items():
if reqName in mongoDocNames:
self.logger.info("Mongo document already created for %s, skipping it.", reqName)
else:
Expand Down Expand Up @@ -634,7 +630,7 @@ def docKeyUpdate(self, msOutDoc, **kwargs):
A function used to update one or few particular fields in a document
:**kwargs: The keys/value pairs to be updated (will be tested against MSOutputTemplate)
"""
for key, value in viewitems(kwargs):
for key, value in kwargs.items():
try:
msOutDoc.setKey(key, value)
msOutDoc.updateTime()
Expand Down