diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2017-07-19 12:13:40 +0200 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2017-07-19 12:13:40 +0200 |
| commit | c250e68b1e4e1c5816fe4dd1dc5c505e1fec8996 (patch) | |
| tree | e39635167d8ee4f9368abe5e3c98ff1d27ebb037 | |
| parent | 20cfb44d752f494cfa28d4b24da28114d303d164 (diff) | |
| download | bridge-c250e68b1e4e1c5816fe4dd1dc5c505e1fec8996.tar.gz bridge-c250e68b1e4e1c5816fe4dd1dc5c505e1fec8996.zip | |
fix type error, pass category not db to key functions
| -rw-r--r-- | service_crunch.js | 4 |
1 files 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", { |
