Page MenuHomeSoftware Heritage

Rewrite the celery task as a decorated function
ClosedPublic

Authored by douardda on Jan 17 2019, 10:29 AM.

Details

Summary

as well as the tests of the task. Requires swh-scheduler >= 0.0.39

The pytest-cov is also moved in the requirements-test.txt file so that
we can depend on swh-scheduler[testing] which will handle the pytest<4
situation (so we won't have to fix each and every swh project when celery 4.3
is out and fixes this pytest incompatibility problem).

Otherwise, if we keep the dep on pytest-cov in the tox file, pip will not manage
properly the version constraints and install pytest>=4.

Diff Detail

Repository
rDLDTAR Tarball Loader
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

vlorentz added a subscriber: vlorentz.
vlorentz added inline comments.
swh/loader/tar/tasks.py
11–12

__name__ + 'LoadTarRepository' for consistance with your other diff

This revision is now accepted and ready to land.Jan 17 2019, 11:46 AM
douardda removed a reviewer: vlorentz.
douardda removed a subscriber: vlorentz.

Revert to explicit pytest<4 requirement and remove debug logging from tasks code

since this later will be managed from the SWHTask directly (see D967)

This revision now requires review to proceed.Jan 17 2019, 11:46 AM
swh/loader/tar/tasks.py
15–17

Logging can be dropped, thanks to D967.

douardda added inline comments.
swh/loader/tar/tasks.py
11–12

Oh yes I forgot, thx

swh/loader/tar/tasks.py
15–17

nvm, you did it while I was writing it ^^

And use name based task name declaration

as requested by vlorentz

This revision was not accepted when it landed; it landed in state Needs Review.Jan 17 2019, 2:46 PM
This revision was automatically updated to reflect the committed changes.