예제 #1
0
파일: queue.py 프로젝트: lygntx/scrapyc
 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()
예제 #2
0
파일: queue.py 프로젝트: lygntx/scrapyc
    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()