Page MenuHomeSoftware Heritage

Add a swh scheduler origin send-to-celery subcommand
ClosedPublic

Authored by olasd on Aug 26 2021, 4:49 PM.

Details

Summary

The subcommand bypasses the legacy task-based mechanism to directly send
new origin visits to celery

Test Plan

simple command line test added to check the basic behavior

Depends on D6145

Event Timeline

Build is green

Patch application report for D6146 (id=22245)

Could not rebase; Attempt merge onto cc76a573e7...

Updating cc76a57..2efad28
Fast-forward
 swh/scheduler/backend.py               |  9 ++++++-
 swh/scheduler/cli/origin.py            | 46 ++++++++++++++++++++++++++++++++++
 swh/scheduler/interface.py             |  3 +++
 swh/scheduler/tests/test_cli_origin.py | 34 +++++++++++++++++++++++++
 swh/scheduler/tests/test_scheduler.py  | 16 ++++++++++++
 5 files changed, 107 insertions(+), 1 deletion(-)
Changes applied before test
commit 2efad289833e971594833b9ed825b9acead8d254
Author: Nicolas Dandrimont <nicolas@dandrimont.eu>
Date:   Tue Jun 1 20:04:11 2021 +0200

    Add a swh scheduler origin send-to-celery subcommand
    
    The subcommand bypasses the legacy task-based mechanism to directly send
    new origin visits to celery

commit 5e8007fdbfeb612ea394f97eeba25a1c4e529b7e
Author: Nicolas Dandrimont <nicolas@dandrimont.eu>
Date:   Tue Jun 1 15:48:05 2021 +0200

    Add table sampling option to grab_next_visits
    
    Running common operations on all git origins is pretty intense. Using
    table sampling gives us the opportunity to at least schedule some jobs
    in (decently small) time.

See https://jenkins.softwareheritage.org/job/DSCH/job/tests-on-diff/447/ for more details.

olasd requested review of this revision.Aug 26 2021, 4:53 PM
This revision is now accepted and ready to land.Aug 26 2021, 5:50 PM