From c250e68b1e4e1c5816fe4dd1dc5c505e1fec8996 Mon Sep 17 00:00:00 2001 From: schneefux Date: Wed, 19 Jul 2017 12:13:40 +0200 Subject: fix type error, pass category not db to key functions --- service_crunch.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/service_crunch.js b/service_crunch.js index bc8d06b..dfc6e6a 100644 --- a/service_crunch.js +++ b/service_crunch.js @@ -95,7 +95,7 @@ module.exports = class Cruncher extends Service { async crunchGlobal(category) { const db = this.getDatabase(category); // get lcpid from keys table - let last_crunch_participant_id = await this.getKey(db, + let last_crunch_participant_id = await this.getKey(category, "global_last_crunch_participant_id", 0); // don't load the whole Participant table at once into memory @@ -119,7 +119,7 @@ module.exports = class Cruncher extends Service { // update lpcid & refetch if (participations.length > 0) { last_crunch_participant_id = participations[participations.length-1].id; - await this.setKey(db, "global_last_crunch_participant_id", + await this.setKey(category, "global_last_crunch_participant_id", last_crunch_participant_id); } logger.info("loading more participations into cruncher", { -- cgit v1.3.1