mirror of
https://github.com/postgres/pgweb.git
synced 2025-08-10 00:42:06 +00:00
Update message counts when finished crawling lists
This commit is contained in:
@ -29,6 +29,9 @@ def doit(opt):
|
||||
listinfo = [(id,name) for id,name in curs.fetchall()]
|
||||
c = MultiListCrawler(listinfo, conn, opt.status_interval, opt.commit_interval)
|
||||
n = c.crawl(opt.full, opt.month)
|
||||
|
||||
# Update total counts
|
||||
curs.execute("WITH t AS (SELECT list,count(*) AS c FROM messages GROUP BY list) UPDATE lists SET pagecount=t.c FROM t WHERE id=t.list")
|
||||
conn.commit()
|
||||
|
||||
log("Indexed %s messages" % n)
|
||||
|
Reference in New Issue
Block a user