Added a status (yellow) for when a job is paused.
This commit is contained in:
parent
6df2531f24
commit
62bf3412a2
2 changed files with 8 additions and 3 deletions
7
tools.py
7
tools.py
|
|
@ -47,14 +47,15 @@ _STATUS_COLORS = [(Status.ok, termstr.Color.green),
|
|||
(Status.problem, termstr.Color.red),
|
||||
(Status.normal, termstr.Color.white),
|
||||
(Status.not_applicable, termstr.Color.grey_100),
|
||||
(Status.running, termstr.Color.light_blue)]
|
||||
(Status.running, termstr.Color.light_blue),
|
||||
(Status.paused, termstr.Color.yellow)]
|
||||
|
||||
|
||||
STATUS_MEANINGS = [
|
||||
(Status.normal, "Normal"), (Status.ok, "Ok"),
|
||||
(Status.problem, "Problem"), (Status.not_applicable, "Not applicable"),
|
||||
(Status.running, "Running"), (Status.pending, "Pending"),
|
||||
(Status.error, "Error")]
|
||||
(Status.running, "Running"), (Status.paused, "Paused"),
|
||||
(Status.pending, "Pending"), (Status.error, "Error")]
|
||||
_STATUS_TO_TERMSTR = {
|
||||
status: termstr.TermStr(" ", termstr.CharStyle(fg_color=color))
|
||||
for status, color in _STATUS_COLORS}
|
||||
|
|
|
|||
4
vigil
4
vigil
|
|
@ -829,8 +829,12 @@ class Runner:
|
|||
|
||||
def pause(self):
|
||||
self.worker.pause()
|
||||
if self.result.status == tools.Status.running:
|
||||
self.result.set_status(tools.Status.paused)
|
||||
|
||||
def continue_(self):
|
||||
if self.result.status == tools.Status.paused:
|
||||
self.result.set_status(tools.Status.running)
|
||||
self.worker.continue_()
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue