With this commit, we stop passing parameters to the load method. We pass those parameters to the loader's constructor.
loader.mercurial: Register mercurial worker
Related to T2134
tox
Build is green See https://jenkins.softwareheritage.org/job/DLDHG/job/tox/39/ for more details.
Build is green See https://jenkins.softwareheritage.org/job/DLDHG/job/tox/40/ for more details.
Looks good !
s/Mapping/Dict/
Why the (*, notation here ?
Just curious, why using @shared_task here as @app.task is used in the other loaders ?
Same remark as in D2398 and D2400, you should use pytest-mock
To force the use of kwargs in the tasks.
To stop importing the scheduler's app state. We had issues with that up to the point we stop doing that import.
That's what we do in lister and loader-core's tasks.
I'm just aligning as i go along (if i see it ;)
Oh I see, should the same behavior be ensured in other loader tasks ?
Ack, you should do the same for the git and svn loader then.
Yes, i think so.
Though there comes the issue of migration (at least for recurring tasks ;)
Indeed.
I possibly missed them.
Adapt according to review
Build is green See https://jenkins.softwareheritage.org/job/DLDHG/job/tox/41/ for more details.
How about using this instead ?
res = swh_app.send_task( 'swh.loader.mercurial.tasks.LoadMercurial', kwargs={'url': 'origin_url', 'directory': '/some/repo', 'visit_date': 'now'})
same here
yup
Build is green See https://jenkins.softwareheritage.org/job/DLDHG/job/tox/42/ for more details.