Skip to content
Snippets Groups Projects
Verified Commit fe37a4d9 authored by Vincent Sellier's avatar Vincent Sellier
Browse files

swh/bulk-load: allow to customize the queue prefix

Related to swh/infra/sysadm-environment#5365
parent 723d0652
No related branches found
No related tags found
No related merge requests found
......@@ -2,7 +2,8 @@
{{ $schedulerConfigRef := required "toolbox.bulkLoad.schedulerConfigurationRef is mandatory" .Values.toolbox.bulkLoad.schedulerConfigurationRef }}
{{ $schedulerConfig := required (print $schedulerConfigRef "not found in toolbox configs") (get .Values.toolbox.configs $schedulerConfigRef) }}
{{- range $job, $job_config := .Values.toolbox.bulkLoad.jobs -}}
{{- $name := ( print "bulk-load-" $job ) }}
{{- $queuePrefix := required (print "queuePrefix is mandatory for bulk load job " $job) $job_config.queuePrefix -}}
{{- $name := ( print "bulk-load-" $queuePrefix "-" $job ) }}
---
apiVersion: batch/v1
kind: Job
......@@ -69,6 +70,8 @@ spec:
value: {{ required (print "bulkLoad origins list url (originListUrl) is mandatory for " $job) $job_config.originListUrl }}
- name: TASK_TYPE
value: {{ required (print "bulkLoad taskType is mandatory for " $job) $job_config.taskType }}
- name: QUEUE_PREFIX
value: {{ $queuePrefix }}
- name: MAX_TASKS
value: {{ $job_config.maxTasks | default 1000 | quote }}
command:
......
......@@ -21,7 +21,7 @@ data:
cat $ORIGINS | swh scheduler origin \
send-origins-from-file-to-celery $TASK_TYPE --threshold=$MAX_TASKS \
--queue-name-prefix oneshot
--queue-name-prefix $QUEUE_PREFIX
echo "Done"
......
......@@ -965,6 +965,8 @@ toolbox:
# originListUrl: https://gitlab.softwareheritage.org/-/project/80/uploads/b93c918fb0b11fd397db8f10b4eb65e9/mbed_hg_repos_sorted.txt
# taskType: load-hg
# maxTasks: 10
# # The queue prefix to use. Must match one the queue configured in a loader
# queuePrefix: oneshot
externalServices:
enabled: false
......
......@@ -612,6 +612,7 @@ toolbox:
# originListUrl: https://gitlab.softwareheritage.org/....
# taskType: load-git
# maxTasks: 10
# queuePrefix: oneshot
scheduler:
enabled: false
......
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