Skip to content

Commit

Permalink
Merge pull request #12154 from amaltaro/fix-11192-wma237
Browse files Browse the repository at this point in the history
Move filter replication json document under etc/ - wmagent branch
  • Loading branch information
amaltaro authored Oct 22, 2024
2 parents 153b0ef + b8a2758 commit 82dd87d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
"_deleted": {"$exists": false},
"type": "WMCore.WorkQueue.DataStructs.WorkQueueElement.WorkQueueElement",
"WMCore\\.WorkQueue\\.DataStructs\\.WorkQueueElement\\.WorkQueueElement":
{"ParentQueueUrl": "config.WorkQueueManager.queueParams['ParentQueueCouchUrl']",
"ChildQueueUrl": "config.WorkQueueManager.queueParams['QueueURL']"}
{"ChildQueueUrl": "config.WorkQueueManager.queueParams['QueueURL']"}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,9 @@ def __init__(self, config):
self.hostPortAMQ = getattr(config.AgentStatusWatcher, "hostPortAMQ", [('cms-mb.cern.ch', 61313)])

# Load CouchDB replication filters
jsonDir = os.path.dirname(os.path.abspath(__file__))
replicationFile = os.path.join(jsonDir, "replication_selector.json")
# see: https://github.com/dmwm/CMSKubernetes/blob/69f0a02a52101ef/docker/pypi/wmagent/Dockerfile#L34
jsonDir = os.environ.get("WMA_DEPLOY_DIR", "/usr/local")
replicationFile = os.path.join(jsonDir, "etc/replication_selector.json")
if os.path.exists(replicationFile):
with open(replicationFile, 'r') as fd:
self.replicationDict = json.load(fd)
Expand Down Expand Up @@ -109,7 +110,6 @@ def setUpCouchDBReplication(self):
localQInboxURL = "%s_inbox" % self.config.AnalyticsDataCollector.localQueueURL
# Update the selector filter
workqueueEscapedKey = "WMCore\.WorkQueue\.DataStructs\.WorkQueueElement\.WorkQueueElement"
self.replicationDict['WorkQueue/queueFilter'][workqueueEscapedKey]["ParentQueueUrl"] = parentQueueUrl
self.replicationDict['WorkQueue/queueFilter'][workqueueEscapedKey]["ChildQueueUrl"] = childQueueUrl
self.replicatorDocs.append({'source': parentQueueUrl,
'target': localQInboxURL,
Expand Down

0 comments on commit 82dd87d

Please sign in to comment.