Skip to content

Commit

Permalink
Fix #392 : Don't schedule auto wake up alarm (#485)
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre-Gilles authored Mar 3, 2019
1 parent 10b067a commit f278a21
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions api/core/alarm/alarm.schedule.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ var shared = require('./alarm.shared.js');
module.exports = function schedule(alarm) {
var rule;

if (alarm.autoWakeUp) {
sails.log.info(`Alarm ${alarm.id} is a auto wake up alarm. No need to schedule it.`);
return Promise.resolve(alarm);
}

if(alarm.cronrule) {

// if alarm is a cronrule
Expand Down

0 comments on commit f278a21

Please sign in to comment.