Fix SIGINT checkClean should only log error instead throw error

This commit is contained in:
Wu Cheng-Han 2017-01-12 17:17:01 +08:00
parent 0432fef267
commit fc788e805e

2
app.js
View file

@ -639,7 +639,7 @@ process.on('SIGINT', function () {
var checkCleanTimer = setInterval(function () { var checkCleanTimer = setInterval(function () {
if (history.isReady() && realtime.isReady()) { if (history.isReady() && realtime.isReady()) {
models.Revision.checkAllNotesRevision(function (err, notes) { models.Revision.checkAllNotesRevision(function (err, notes) {
if (err) throw new Error(err); if (err) return logger.error(err);
if (!notes || notes.length <= 0) { if (!notes || notes.length <= 0) {
clearInterval(checkCleanTimer); clearInterval(checkCleanTimer);
return process.exit(0); return process.exit(0);