From 1e6de0b90e48517c7a7f3293127e6254281b6c77 Mon Sep 17 00:00:00 2001 From: Wu Cheng-Han Date: Sat, 15 Oct 2016 13:54:16 +0800 Subject: [PATCH] Change revision saving policy period --- lib/models/revision.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/models/revision.js b/lib/models/revision.js index b497f0e..33fdd73 100644 --- a/lib/models/revision.js +++ b/lib/models/revision.js @@ -208,10 +208,10 @@ module.exports = function (sequelize, DataTypes) { if (note.lastchangeAt && note.savedAt) { var lastchangeAt = moment(note.lastchangeAt); var savedAt = moment(note.savedAt); - if (moment().isAfter(lastchangeAt.add(1, 'minutes'))) { + if (moment().isAfter(lastchangeAt.add(5, 'minutes'))) { savedNotes.push(note); Revision.saveNoteRevision(note, _callback); - } else if (lastchangeAt.isAfter(savedAt.add(2, 'minutes'))) { + } else if (lastchangeAt.isAfter(savedAt.add(10, 'minutes'))) { savedNotes.push(note); Revision.saveNoteRevision(note, _callback); } else {