Changeset View
Changeset View
Standalone View
Standalone View
swh/lister/tuleap/tasks.py
- This file was added.
# Copyright (C) 2021 the Software Heritage developers | |||||
# License: GNU General Public License version 3, or any later version | |||||
# See top-level LICENSE file for more information | |||||
from typing import Dict | |||||
from celery import shared_task | |||||
from .lister import TuleapLister | |||||
@shared_task(name=__name__ + ".FullTuleapLister") | |||||
ardumont: why `Relister`?
I think FullTuleapLister is fine enough (and that does not clash with the… | |||||
Done Inline ActionsNo reason really, it's just that gitea had it, so I thought it would be ok to just leave it. Changed it to FullTuleapLister in the upcoming commit. borisbaldassari: No reason really, it's just that gitea had it, so I thought it would be ok to just leave it. | |||||
def list_tuleap_full(**lister_args) -> Dict[str, int]: | |||||
"""Full update of a Tuleap instance""" | |||||
lister = TuleapLister.from_configfile(**lister_args) | |||||
return lister.run().dict() | |||||
Done Inline Actionsyou can drop the print when you are done ;) ardumont: you can drop the print when you are done ;) | |||||
@shared_task(name=__name__ + ".ping") | |||||
def _ping() -> str: | |||||
return "OK" |
why Relister?
I think FullTuleapLister is fine enough (and that does not clash with the imported .lister.TupleLister class