From edf1849bac4b5c211b9203ddacfacf914b169fe7 Mon Sep 17 00:00:00 2001 From: Simon Date: Fri, 16 Nov 2018 23:01:28 -0500 Subject: [PATCH] Create new rescan task when no queued tasks pt2 --- database.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/database.py b/database.py index a12d428..295110b 100644 --- a/database.py +++ b/database.py @@ -388,8 +388,8 @@ class Database: cursor.execute("SELECT id, website_id, url, priority, callback_type, callback_args " + "FROM Queue WHERE assigned_crawler is NULL " + - ("AND url LIKE 'ftp%'" if ftp else "") + - "ORDER BY priority DESC, Queue.id" + + ("AND url LIKE 'ftp%' " if ftp else "") + + "ORDER BY priority DESC, Queue.id " + "ASC LIMIT 1") task = cursor.fetchone()