aboutsummaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/bldcontrol
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/toaster/bldcontrol')
-rw-r--r--bitbake/lib/toaster/bldcontrol/migrations/0005_reorder_buildrequest_states.py19
-rw-r--r--bitbake/lib/toaster/bldcontrol/models.py12
2 files changed, 25 insertions, 6 deletions
diff --git a/bitbake/lib/toaster/bldcontrol/migrations/0005_reorder_buildrequest_states.py b/bitbake/lib/toaster/bldcontrol/migrations/0005_reorder_buildrequest_states.py
new file mode 100644
index 0000000000..4bb9517768
--- /dev/null
+++ b/bitbake/lib/toaster/bldcontrol/migrations/0005_reorder_buildrequest_states.py
@@ -0,0 +1,19 @@
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('bldcontrol', '0004_auto_20160523_1446'),
+ ]
+
+ operations = [
+ migrations.AlterField(
+ model_name='buildrequest',
+ name='state',
+ field=models.IntegerField(choices=[(0, 'created'), (1, 'queued'), (2, 'in progress'), (3, 'failed'), (4, 'deleted'), (5, 'cancelling'), (6, 'completed'), (7, 'archive')], default=0),
+ ),
+ ]
diff --git a/bitbake/lib/toaster/bldcontrol/models.py b/bitbake/lib/toaster/bldcontrol/models.py
index f06c562a38..f055480686 100644
--- a/bitbake/lib/toaster/bldcontrol/models.py
+++ b/bitbake/lib/toaster/bldcontrol/models.py
@@ -63,20 +63,20 @@ class BuildRequest(models.Model):
REQ_CREATED = 0
REQ_QUEUED = 1
REQ_INPROGRESS = 2
- REQ_COMPLETED = 3
- REQ_FAILED = 4
- REQ_DELETED = 5
- REQ_CANCELLING = 6
+ REQ_FAILED = 3
+ REQ_DELETED = 4
+ REQ_CANCELLING = 5
+ REQ_COMPLETED = 6
REQ_ARCHIVE = 7
REQUEST_STATE = (
(REQ_CREATED, "created"),
(REQ_QUEUED, "queued"),
(REQ_INPROGRESS, "in progress"),
- (REQ_COMPLETED, "completed"),
(REQ_FAILED, "failed"),
(REQ_DELETED, "deleted"),
(REQ_CANCELLING, "cancelling"),
+ (REQ_COMPLETED, "completed"),
(REQ_ARCHIVE, "archive"),
)
@@ -91,7 +91,7 @@ class BuildRequest(models.Model):
def __init__(self, *args, **kwargs):
super(BuildRequest, self).__init__(*args, **kwargs)
- # Save the old state incase it's about to be modified
+ # Save the old state in case it's about to be modified
self.old_state = self.state
def save(self, *args, **kwargs):