From c899f8d0e23e73be6830a07ec90f70a3288bdb89 Mon Sep 17 00:00:00 2001 From: schneefux Date: Fri, 11 Aug 2017 10:40:17 +0200 Subject: don't wipe pp --- service_crunch.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'service_crunch.js') diff --git a/service_crunch.js b/service_crunch.js index bc067ff..1ea6447 100644 --- a/service_crunch.js +++ b/service_crunch.js @@ -62,11 +62,9 @@ module.exports = class Cruncher extends Service { }); if (last_crunch_r) where.created_at = { $gt: last_crunch_r.updated_at }; - // wipe previous calculations - await db.PlayerPoint.destroy({ where }); // get all participants for this player const participations = await db.Participant.findAll({ - attributes: [ "api_id" ], + attributes: [ "api_id", "created_at" ], where, order: [ ["created_at", "ASC" ] ] }); -- cgit v1.3.1