aboutsummaryrefslogtreecommitdiffstats
path: root/api/database/models.py
diff options
context:
space:
mode:
authorJing Lu <lvjing5@huawei.com>2017-01-10 09:11:54 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-01-10 09:11:54 +0000
commit9667f5d35df9caf9a3a8f851c2ce3612fa2ba437 (patch)
treee42240c9d2209aa37d54da44a1c89b00ac8cd1cd /api/database/models.py
parentceebb672c85c5dbce6df17f0c263375d17adcc05 (diff)
parent63e75aad3b01de4fc20468d5dd9cdb9b15c5e11e (diff)
Merge "Add API to get the status of async task"
Diffstat (limited to 'api/database/models.py')
-rw-r--r--api/database/models.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/api/database/models.py b/api/database/models.py
index 25e323842..2fc141c1f 100644
--- a/api/database/models.py
+++ b/api/database/models.py
@@ -23,3 +23,14 @@ class Tasks(Base):
def __repr__(self):
return '<Task %r>' % Tasks.task_id
+
+
+class AsyncTasks(Base):
+ __tablename__ = 'asynctasks'
+ id = Column(Integer, primary_key=True)
+ task_id = Column(String(30))
+ status = Column(Integer)
+ error = Column(String(120))
+
+ def __repr__(self):
+ return '<Task %r>' % AsyncTasks.task_id