From dc86a11affda4ebdb1087f8e8f9b51abc764e757 Mon Sep 17 00:00:00 2001 From: ossean Date: Mon, 25 Apr 2016 09:12:29 +0800 Subject: [PATCH] updat pointers according to the number fetched urls --- producer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/producer.py b/producer.py index 47aa09e..05020f9 100755 --- a/producer.py +++ b/producer.py @@ -36,7 +36,7 @@ def start(): for url in urls_added: r.rpush("repo_urls","%d-%s"%(url[0],url[1])) cursor.execute(sql_update_pushtime,(time.time(),url[0])) - cursor.execute(sql_update_pointer,(last_id + patch_size,)) + cursor.execute(sql_update_pointer,(last_id + len(urls_added),)) conn.commit() else: logger.info(">>enough urls")