-
- Downloads
plugins: add support for scheduler's task-type declaration
Add a new register-task-types cli that will create missing task-type entries in the scheduler according to: - only create missing task-types (do not update them), but check that the backend_name field is consistent, - each SWHTask-based task declared in a module listed in the 'task_modules' plugin registry field will be checked and added if needed; tasks which name start wit an underscore will not be added, - added task-type will have: - the 'type' field is derived from the task's function name (with underscores replaced with dashes), - the description field is the first line of that function's docstring, - default values as provided by the swh.lister.cli.DEFAULT_TASK_TYPE (with a simple pattern matching to have decent default values for full/incremental tasks), - these default values can be overloaded via the 'task_type' plugin registry entry. For this, we had to rename all tasks names (eg. `cran_lister` -> `list_cran`). Comes with some tests.
parent
e3c0ea9d
No related branches found
No related tags found
Showing
- swh/lister/bitbucket/tasks.py 7 additions, 6 deletionsswh/lister/bitbucket/tasks.py
- swh/lister/cgit/tasks.py 3 additions, 2 deletionsswh/lister/cgit/tasks.py
- swh/lister/cli.py 103 additions, 1 deletionswh/lister/cli.py
- swh/lister/cran/tasks.py 3 additions, 2 deletionsswh/lister/cran/tasks.py
- swh/lister/debian/tasks.py 3 additions, 2 deletionsswh/lister/debian/tasks.py
- swh/lister/github/tasks.py 7 additions, 6 deletionsswh/lister/github/tasks.py
- swh/lister/gitlab/tasks.py 7 additions, 10 deletionsswh/lister/gitlab/tasks.py
- swh/lister/gnu/tasks.py 3 additions, 2 deletionsswh/lister/gnu/tasks.py
- swh/lister/npm/__init__.py 7 additions, 0 deletionsswh/lister/npm/__init__.py
- swh/lister/npm/tasks.py 5 additions, 3 deletionsswh/lister/npm/tasks.py
- swh/lister/packagist/tasks.py 3 additions, 2 deletionsswh/lister/packagist/tasks.py
- swh/lister/phabricator/tasks.py 3 additions, 2 deletionsswh/lister/phabricator/tasks.py
- swh/lister/pypi/tasks.py 3 additions, 2 deletionsswh/lister/pypi/tasks.py
- swh/lister/tests/test_cli.py 76 additions, 1 deletionswh/lister/tests/test_cli.py
Loading
Please register or sign in to comment