Changeset View
Changeset View
Standalone View
Standalone View
swh/lister/tuleap/tasks.py
- This file was added.
Property | Old Value | New Value |
---|---|---|
File Mode | null | 100755 |
# Copyright (C) 2020 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__ + ".FullTuleapRelister") | |||||
ardumont: why `Relister`?
I think FullTuleapLister is fine enough (and that does not clash with the… | |||||
borisbaldassariAuthorUnsubmitted 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) | |||||
print("NAME", __name__) | |||||
ardumontUnsubmitted Done Inline Actionsyou can drop the print when you are done ;) ardumont: you can drop the print when you are done ;) | |||||
return lister.run().dict() | |||||
@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