From fe5ed6c7b05cfbf55859555522609edbb2218fee Mon Sep 17 00:00:00 2001 From: Ben Kurtovic Date: Mon, 1 Sep 2014 22:37:04 -0500 Subject: [PATCH] Add mode to cache data per new schema. --- tasks/afc_copyvios.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tasks/afc_copyvios.py b/tasks/afc_copyvios.py index 40a8952..2944872 100644 --- a/tasks/afc_copyvios.py +++ b/tasks/afc_copyvios.py @@ -207,7 +207,8 @@ class AFCCopyvios(Task): ON DUPLICATE KEY UPDATE cache_url = ?, cache_time = CURRENT_TIMESTAMP, cache_queries = ?, cache_process_time = 0""" - shahash = sha256(page.get().encode("utf8")).hexdigest() + mode = "1:1:" + shahash = sha256(mode + page.get().encode("utf8")).hexdigest() args = (page.pageid, shahash, result.url, result.queries, result.url, result.queries) with self.conn.cursor() as cursor: