state.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:drydock 作者: att-comdev 项目源码 文件源码
def tabularasa(self):
        """Truncate all tables.

        Used for testing to truncate all tables so the database is clean.
        """
        table_names = [
            'tasks',
            'result_message',
            'active_instance',
            'boot_action',
            'boot_action_status',
        ]

        conn = self.db_engine.connect()
        for t in table_names:
            query_text = sql.text(
                "TRUNCATE TABLE %s" % t).execution_options(autocommit=True)
            conn.execute(query_text)
        conn.close()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号