Page MenuHomeSoftware Heritage

Add a new 'task list' cli command
ClosedPublic

Authored by douardda on Jan 14 2019, 11:43 AM.

Details

Summary
  • Add a SchedulerBackend.search_tasks method
  • Add a 'full' flag argument to the pretty_print_task function

    to display also the status and priority fields.
  • Add a 'task list' cli command to list tasks with search criterions

    and not only pending tasks.

Depends on D932

Diff Detail

Repository
rDSCH Scheduling utilities
Branch
wip
Lint
Lint Skipped
Unit
Unit Tests Skipped
Build Status
Buildable 3470
Build 4481: tox-on-jenkinsJenkins
Build 4480: arc lint + arc unit

Event Timeline

vlorentz added a subscriber: vlorentz.
vlorentz added inline comments.
swh/scheduler/cli.py
52

full could be documented.

This revision is now accepted and ready to land.Jan 14 2019, 12:19 PM
ardumont added inline comments.
swh/scheduler/backend.py
350

Isn't there something missing here?

where 1=1' + ' and ...
swh/scheduler/backend.py
350

Nevermind, should have checked prior to submit ;)

I checked and no:

$ python3
>>> ' and '.join(['1 = 1', '2 = 2'])
'1 = 1 and 2 = 2'
swh/scheduler/cli.py
294

List tasks whose status ...

Same for options below ;)

Add missing parts of added api endpoint server side

rebased and fix typos/wording according to comments in phab

This revision was automatically updated to reflect the committed changes.