Skip to content

Commit

Permalink
Move filter replication json document under etc/
Browse files Browse the repository at this point in the history
Do not set ParentQueueUrl in the selector filter
  • Loading branch information
amaltaro committed Oct 18, 2024
1 parent 153b0ef commit a23be0c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
File renamed without changes.
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 a23be0c

Please sign in to comment.