Skip to content

Commit

Permalink
Give each DID Finder its own queue to read tasks from
Browse files Browse the repository at this point in the history
  • Loading branch information
BenGalewsky committed Jul 8, 2024
1 parent 6deb330 commit 548f08b
Show file tree
Hide file tree
Showing 9 changed files with 143 additions and 132 deletions.
8 changes: 4 additions & 4 deletions did_finder_cernopendata/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion did_finder_cernopendata/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ packages = [{include = "did_finder_cernopendata", from = "src"}]

[tool.poetry.dependencies]
python = "~3.10"
servicex-did-finder-lib = "^3.0.0-alpha.4"
servicex-did-finder-lib = "^3.0.0-alpha.5"

[tool.poetry.group.test]
optional = true
Expand Down
224 changes: 104 additions & 120 deletions did_finder_rucio/poetry.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion did_finder_rucio/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ packages = [{include = "rucio_did_finder", from = "src"}]
python = "^3.9"
rucio-clients = "^34.2.0"
xmltodict = "^0.13.0"
servicex-did-finder-lib = "^3.0.0-alpha.4"
servicex-did-finder-lib = "^3.0.0-alpha.5"
requests = ">=2.25.0,<3.0.0"

[tool.poetry.group.test]
Expand Down
8 changes: 4 additions & 4 deletions did_finder_xrootd/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion did_finder_xrootd/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ packages = [{include = "src/servicex_did_finder_xrootd"}]

[tool.poetry.dependencies]
python = ">=3.10,<4.0"
servicex-did-finder-lib = "^3.0.0-alpha.4"
servicex-did-finder-lib = "^3.0.0-alpha.5"
xrootd = ">=5.6.9"

[tool.poetry.group.test]
Expand Down
18 changes: 18 additions & 0 deletions helm/servicex/templates/app/celery_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ .Release.Name }}-celery-config
labels:
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
app: {{ .Release.Name }}

data:
celery_config.py: |
broker_url = 'amqp://user:{{ .Values.rabbitmq.auth.password }}@{{ .Release.Name }}-rabbitmq:5672/%2F'
task_routes = {
'did_finder_cernopendata.tasks.lookup_dataset': {'queue': 'did_finder_cernopendata'},
'did_finder_rucio.tasks.lookup_dataset': {'queue': 'did_finder_rucio'},
'did_finder_xrootd.tasks.lookup_dataset': {'queue': 'did_finder_xrootd'},
}
5 changes: 5 additions & 0 deletions helm/servicex/templates/app/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@ spec:
volumeMounts:
- name: app-cfg
mountPath: /opt/servicex
- name: celery-cfg
mountPath: /opt/servicex/celery
- name: sqlite
mountPath: /sqlite
{{- if .Values.app.defaultUsers }}
Expand All @@ -147,6 +149,9 @@ spec:
- name: app-cfg
configMap:
name: {{ .Release.Name }}-flask-config
- name: celery-cfg
configMap:
name: {{ .Release.Name }}-celery-config
- name: sqlite
emptyDir: {}
{{- if .Values.app.defaultUsers }}
Expand Down
6 changes: 5 additions & 1 deletion servicex_app/servicex_app/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,11 @@ def b64decode(text): # needed for python selection decoding to web page.
transformer_manager = provided_transformer_manager

if not provided_celery_app:
celery_app = Celery('ServiceX-App', broker=app.config['RABBIT_MQ_URL'])
sys.path.append('/opt/servicex/celery')

celery_app = Celery('ServiceX-App')
celery_app.config_from_object('celery_config')

else:
celery_app = provided_celery_app

Expand Down

0 comments on commit 548f08b

Please sign in to comment.