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
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

douardda created this revision.Jan 14 2019, 11:43 AM
vlorentz accepted this revision.Jan 14 2019, 12:19 PM
vlorentz added a subscriber: vlorentz.
vlorentz added inline comments.
swh/scheduler/cli.py
52 ↗(On Diff #2958)

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
351

Isn't there something missing here?

where 1=1' + ' and ...
ardumont added inline comments.Jan 14 2019, 12:22 PM
swh/scheduler/backend.py
351

Nevermind, should have checked prior to submit ;)

I checked and no:

$ python3
>>> ' and '.join(['1 = 1', '2 = 2'])
'1 = 1 and 2 = 2'
ardumont added inline comments.Jan 14 2019, 12:25 PM
swh/scheduler/cli.py
295 ↗(On Diff #2958)

List tasks whose status ...

Same for options below ;)

ardumont accepted this revision.Jan 14 2019, 12:27 PM
douardda updated this revision to Diff 2974.Jan 14 2019, 3:22 PM

Add missing parts of added api endpoint server side

douardda updated this revision to Diff 2992.Jan 15 2019, 3:05 PM

rebased and fix typos/wording according to comments in phab

This revision was automatically updated to reflect the committed changes.