Changeset View
Changeset View
Standalone View
Standalone View
docs/save_forge.rst
- This file was added.
.. _save_a_forge: | |||||
Save a forge | |||||
============ | |||||
To start recurringly listing a forge, first register a lister task for a given forge to | |||||
douardda: unneeded (IMHO) | |||||
Not Done Inline ActionsWhy "first" here? what is the second step this "first" calls? douardda: Why "first" here? what is the second step this "first" calls? | |||||
Done Inline ActionsThe other instructions probably got dopped and i forgot to drop the first here. ardumont: The other instructions probably got dopped and i forgot to drop the first here. | |||||
the scheduler. This assumes the forge's listing type is already supported in the | |||||
scheduler. | |||||
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/' |
unneeded (IMHO)