From 04dc6280916ab0e3303f0d8785df0352129a2b18 Mon Sep 17 00:00:00 2001 From: "Antoine R. Dumont (@ardumont)" Date: Thu, 7 Oct 2021 15:42:30 +0200 Subject: [PATCH] docs: Explain task type registering to complete the save forge doc Related to T3629 --- docs/save_forge.rst | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/docs/save_forge.rst b/docs/save_forge.rst index 8c4e5f6..b6e1de1 100644 --- a/docs/save_forge.rst +++ b/docs/save_forge.rst @@ -49,3 +49,29 @@ For example: Keyword args: limit: 100 url: 'https://codeberg.org/api/v1/' + +.. _register-task-type: + +Register task types to the scheduler +------------------------------------ + +- To register new task types, ensure you have the code at the required version: + + - docker environment: use :file:`docker-compose.override.yml` with the desired + :ref:`volume for both lister and scheduler* containers` + - for production/staging, upgrade the swh package first then trigger the cli. + +- Use the ``swh scheduler task-type register`` command: + +:: + + $ swh scheduler --config-file /etc/softwareheritage/scheduler.yml task-type register + INFO:swh.core.config:Loading config file /etc/softwareheritage/scheduler.yml + INFO:swh.scheduler.cli.task_type:Loading entrypoint for plugin lister.launchpad + INFO:swh.scheduler.cli.task_type:Create task type list-launchpad-incremental in scheduler + INFO:swh.scheduler.cli.task_type:Create task type list-launchpad-full in scheduler + INFO:swh.scheduler.cli.task_type:Create task type list-launchpad-new in scheduler + ... + + +Note: The command is idempotent so it can be executed multiple times.