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/database/__init__.py | 6 ------ 1 file changed, 6 deletions(-) (limited to 'api/database/__init__.py') diff --git a/api/database/__init__.py b/api/database/__init__.py index bc2708bc7..5b0bb05a2 100644 --- a/api/database/__init__.py +++ b/api/database/__init__.py @@ -21,9 +21,3 @@ db_session = scoped_session(sessionmaker(autocommit=False, bind=engine)) Base = declarative_base() Base.query = db_session.query_property() - - -def init_db(): - subclasses = [subclass.__name__ for subclass in Base.__subclasses__()] - logger.debug('Import models: %s', subclasses) - Base.metadata.create_all(bind=engine) -- cgit 1.2.3-korg