Add 'Verifying' to class Job so that View Job allows users to view machines
that are 'stuck' in verify or taking a long time in cleaning
Signed-off-by: Scott Zawalski <scottz@google.com>
git-svn-id: http://test.kernel.org/svn/autotest/trunk@2560 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/frontend/afe/models.py b/frontend/afe/models.py
index 5f8e777..29da5e4 100644
--- a/frontend/afe/models.py
+++ b/frontend/afe/models.py
@@ -50,7 +50,7 @@
def enqueue_job(self, job):
'Enqueue a job on any host of this label.'
queue_entry = HostQueueEntry(meta_host=self, job=job,
- status=Job.Status.QUEUED,
+ status=HostQueueEntry.Status.QUEUED,
priority=job.priority)
queue_entry.save()
@@ -232,7 +232,7 @@
def enqueue_job(self, job):
' Enqueue a job on this host.'
queue_entry = HostQueueEntry(host=self, job=job,
- status=Job.Status.QUEUED,
+ status=HostQueueEntry.Status.QUEUED,
priority=job.priority)
# allow recovery of dead hosts from the frontend
if not self.active_queue_entry() and self.is_dead():
@@ -589,9 +589,6 @@
Priority = enum.Enum('Low', 'Medium', 'High', 'Urgent')
ControlType = enum.Enum('Server', 'Client', start_value=1)
- Status = enum.Enum('Created', 'Queued', 'Pending', 'Running',
- 'Completed', 'Abort', 'Aborting', 'Aborted',
- 'Failed', 'Starting', string_values=True)
owner = dbmodels.CharField(maxlength=255)
name = dbmodels.CharField(maxlength=255)
@@ -773,7 +770,7 @@
# this isn't completely immune to race conditions since it's not atomic,
# but it should be safe given the scheduler's behavior.
if not self.complete and self.status not in self.ABORT_STATUSES:
- self.status = Job.Status.ABORT
+ self.status = HostQueueEntry.Status.ABORT
self.log_abort(user)
self.save()