From 63e75aad3b01de4fc20468d5dd9cdb9b15c5e11e Mon Sep 17 00:00:00 2001 From: chenjiankun Date: Wed, 4 Jan 2017 17:41:18 +0000 Subject: Add API to get the status of async task JIRA: YARDSTICK-526 Currently there are many API run a task using sub thread. But we don't know the status of this task. So we need to offer a API to query the status of this task. Change-Id: I8d2cc558750bf9270aed4a7abb8bf35d17894d83 Signed-off-by: chenjiankun --- api/views.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'api/views.py') diff --git a/api/views.py b/api/views.py index ee13b47a9..69ca89186 100644 --- a/api/views.py +++ b/api/views.py @@ -24,6 +24,11 @@ TestCaseActionArgsOptsModel = models.TestCaseActionArgsOptsModel TestCaseActionArgsOptsTaskArgModel = models.TestCaseActionArgsOptsTaskArgModel +class Asynctask(ApiResource): + def get(self): + return self._dispatch_get() + + class ReleaseAction(ApiResource): @swag_from(os.getcwd() + '/swagger/docs/testcases.yaml') def post(self): -- cgit 1.2.3-korg