Page MenuHomeSoftware Heritage

indexer.cli.journal_client: Simplify the journal client call
ClosedPublic

Authored by ardumont on Mar 27 2020, 10:25 AM.

Details

Summary

This aligns with other journal clients.
This lets the main loop being done by the journal client base class.

Related to D2897

Needs D2901 (released) for test to pass

Test Plan

tox

Diff Detail

Repository
rDCIDX Metadata indexer
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

olasd requested changes to this revision.Mar 27 2020, 10:32 AM
olasd added inline comments.
swh/indexer/cli.py
225–227

To be useful, I think that logging should be happening at the worker_fn level rather than outside of the call to client.process(). This means you can drop the last_log_time logic altogether.

This revision now requires changes to proceed.Mar 27 2020, 10:32 AM

Adapt according to review

Tests should be green now as the journal got releases with the necessary changes.

Add missing requirements update on journal

This revision is now accepted and ready to land.Mar 27 2020, 11:02 AM

(tests need an update for the new logging output)

yes, indeed, i was on it ;)
(i forgot to run locally prior to pushing so i missed it).

Fix missing test adaptation