docs: Add a save forge documentation

This does not yet enter into the registration of a new lister.

Related to T3629
This commit is contained in:
Antoine R. Dumont (@ardumont) 2021-10-06 18:42:20 +02:00
parent e7716c0122
commit 1a9c08c93f
No known key found for this signature in database
GPG key ID: 52E2E9840D10C3B8
2 changed files with 52 additions and 0 deletions

View file

@ -19,6 +19,7 @@ Overview
tutorial
run_a_new_lister
save_forge
Reference Documentation

51
docs/save_forge.rst Normal file
View file

@ -0,0 +1,51 @@
.. _save-forge:
Save a forge
============
Assuming the forge's :ref:`listing type is already supported in the
scheduler<register-task-type>`, use ``swh scheduler task add`` command:
::
swh scheduler --config-file /etc/softwareheritage/scheduler.yml \
task add [--policy [recurring|oneshot]] <task-type> [param1=value1] [param2=value2]
For example:
- To add a task requiring no parameters (launchpad lister)
::
$ swh scheduler --config-file /etc/softwareheritage/scheduler.yml \
task add list-launchpad-full
INFO:swh.core.config:Loading config file /etc/softwareheritage/scheduler.yml
Created 1 tasks
Task 1240540
Next run: just now (2020-09-08 13:08:07+00:00)
Interval: 90 days, 0:00:00
Type: list-launchpad-full
Policy: recurring
Args:
Keyword args:
- To add a one-shot task with parameters:
::
$ swh scheduler --config-file /etc/softwareheritage/scheduler.yml \
task add --policy oneshot \
list-gitea-full url=https://codeberg.org/api/v1/ limit=100
INFO:swh.core.config:Loading config file /etc/softwareheritage/scheduler.yml
Created 1 tasks
Task 1240540
Next run: just now (2020-09-11 14:25:45+00:00)
Interval: 90 days, 0:00:00
Type: list-gitea-full
Policy: oneshot
Args:
Keyword args:
limit: 100
url: 'https://codeberg.org/api/v1/'