def remove_by_taskid(self,task_id): if not task_id or not isinstance(str,task_id): return session = SafeSession() for task in session.query(TaskModel).filter_by(task_id=task_id).all(): session.delete(task) SafeSession.remove()
def remove_by_project(self,project_name): if not project_name or not isinstance(str,project_name): return session = SafeSession() for task in session.query(TaskModel).filter_by(project_name=project).all(): session.delete(task) SafeSession.remove()