From 63aca89a3e0183c13e4eb9219c42062357f18a43 Mon Sep 17 00:00:00 2001
From: Nicolas Dandrimont <nicolas@dandrimont.eu>
Date: Thu, 31 Aug 2023 16:33:48 +0200
Subject: [PATCH] Improve the section on celery settings

This is not only used by the scheduler, and referencing the full range
of upstream settings may be useful.
---
 docs/devel/configuration.rst | 33 +++++++++++++++++----------------
 1 file changed, 17 insertions(+), 16 deletions(-)

diff --git a/docs/devel/configuration.rst b/docs/devel/configuration.rst
index 70a3e467..f8af7364 100644
--- a/docs/devel/configuration.rst
+++ b/docs/devel/configuration.rst
@@ -33,6 +33,23 @@ For example, a possible configuration for swh-vault is::
 All URLs in this document are examples, see :ref:`service-url` for actual values.
 
 
+.. _cli-config-celery:
+
+celery
+------
+
+The :ref:`scheduler <swh-scheduler>` uses Celery for running some tasks. This
+configuration key is used for parameters passed directly to Celery, e.g. the URI
+of the RabbitMQ broker used for distribution of tasks, for both scheduler
+commands as well as Celery workers.
+
+The contents of this configuration key follow the `"lowercase settings" schema from
+Celery upstream
+<https://docs.celeryq.dev/en/stable/userguide/configuration.html#new-lowercase-settings>`_.
+
+Some default values can be found in :mod:`swh.scheduler.celery_backend.config`.
+
+
 .. _cli-config-graph:
 
 graph
@@ -78,22 +95,6 @@ HTTP endpoint; usually on port 5008 or at the path ``/scheduler/``.::
       cls: remote
       url: http://saatchi.internal.softwareheritage.org:5008
 
-.. _cli-config-celery:
-
-celery
-^^^^^^
-
-Some of of the scheduler's admin subcommand additionally expect Celery configuration::
-
-    celery:
-      broker_heartbeat: null
-      task_broker: amqp://guest:guest@amqp/%2f
-      broker_transport_options:
-        max_retries: 1
-
-Other configuration options, as well as their default values, can be found in
-`swh/scheduler/celery_backend/config.py <https://gitlab.softwareheritage.org/swh/devel/swh-scheduler/-/blob/9a91b8d197b3a0d19cbaa95f7008702280eed05e/swh/scheduler/celery_backend/config.py#L313-357>`__
-
 .. _cli-config-storage:
 
 storage
-- 
GitLab