summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2017-07-30 12:34:44 +0200
committerschneefux <schneefux+commit@schneefux.xyz>2017-07-30 12:34:44 +0200
commit9390318b8f2459704546b202dce3f3b3e4c569c3 (patch)
tree30fc093e3f6bc7935164ca0ff4437e78c144c463
parentfac54956494674f189d6ad3e54f944b2d79f1684 (diff)
downloadreaper-9390318b8f2459704546b202dce3f3b3e4c569c3.tar.gz
reaper-9390318b8f2459704546b202dce3f3b3e4c569c3.zip
go upwards
-rw-r--r--app.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/app.js b/app.js
index 0a655a3..e6554b0 100644
--- a/app.js
+++ b/app.js
@@ -46,12 +46,12 @@ async function load(table, type, includes, filter) {
// load from biggest id to 0
const last_id_r = await model.Keys.findOrCreate({
where: { type: "reaper_last_id_fetched", key: type },
- defaults: { value: 2147483647 }
+ defaults: { value: 0 }
});
while (true) {
const last_id = last_id_r[0].value,
condition = Object.assign({}, filter,
- { id: { $lt: last_id } });
+ { id: { $gt: last_id } });
logger.info("loading", { type, last_id });