From 81fedf6def827d534ce41a46df71ac5559f91049 Mon Sep 17 00:00:00 2001 From: Magnus Hagander Date: Sun, 22 Jan 2012 12:06:32 +0100 Subject: [PATCH] Make it possible to crawl more than one list at a time, without doing all --- tools/search/crawler/listcrawler.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/search/crawler/listcrawler.py b/tools/search/crawler/listcrawler.py index e528ab5c..02091284 100755 --- a/tools/search/crawler/listcrawler.py +++ b/tools/search/crawler/listcrawler.py @@ -19,8 +19,9 @@ def doit(opt): curs = conn.cursor() if opt.list: - curs.execute("SELECT id,name FROM lists WHERE name=%(name)s", { - 'name': opt.list, + # Multiple lists can be specified with a comma separator (no spaces) + curs.execute("SELECT id,name FROM lists WHERE name=ANY(%(names)s)", { + 'names': opt.list.split(','), }) else: curs.execute("SELECT id,name FROM lists WHERE active ORDER BY id") -- 2.39.5