本文整理汇总了Python中convirt.model.DBSession.remove方法的典型用法代码示例。如果您正苦于以下问题:Python DBSession.remove方法的具体用法?Python DBSession.remove怎么用?Python DBSession.remove使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类convirt.model.DBSession
的用法示例。
在下文中一共展示了DBSession.remove方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: task_started
# 需要导入模块: from convirt.model import DBSession [as 别名]
# 或者: from convirt.model.DBSession import remove [as 别名]
(short_desc, short_desc_params) = desc_tuple
desc = (short_desc)%short_desc_params
results = desc+' Completed Successfully.'
#commit changes done by exec_task
transaction.commit()
except Exception, e:
#rollback any changes made in thread session
logger.exception(to_str(e))
transaction.abort()
if not self.quiet:
self.task_fail(e, auth)
else:
if not self.quiet and cancelled==False:
self.task_success(results,visible)
finally:
DBSession.remove()
def task_started(self):
conn = self.task_manager.get_database_conn()
try:
res = TaskResult(self.task_id, \
self.curr_instance, \
self.STARTED, \
None)
conn.add(res)
conn.commit()
if not self.repeating and self.entity_id!=None:
UIUpdateManager().set_updated_tasks(self.task_id, \
self.user_name)
finally: