lib/flapjack/data/notification.rb in flapjack-0.9.0 vs lib/flapjack/data/notification.rb in flapjack-0.9.1
- old
+ new
@@ -154,11 +154,12 @@
matches_regex_tags = rule_has_regex_tags ? rule.match_regex_tags?(@tags) : true
matches_entity = rule_has_entities ? rule.match_entity?(@event_id) : true
matches_regex_entities = rule_has_regex_entities ? rule.match_regex_entities?(@event_id) : true
((matches_entity && matches_regex_entities && matches_tags && matches_regex_tags) || ! rule.is_specific?) &&
- rule_occurring_now?(rule, :contact => contact, :default_timezone => default_timezone)
+ rule_occurring_now?(rule, :contact => contact, :default_timezone => default_timezone,
+ :logger => logger)
end
logger.debug "#{matchers.length} matchers remain for this contact after time, entity and tags are matched:"
matchers.each do |matcher|
logger.debug " - #{matcher.to_json}"
@@ -278,10 +279,10 @@
usertime = timezone.now
rule.time_restrictions.any? do |tr|
# add contact's timezone to the time restriction schedule
schedule = Flapjack::Data::NotificationRule.
- time_restriction_to_icecube_schedule(tr, timezone)
+ time_restriction_to_icecube_schedule(tr, timezone, :logger => options[:logger])
schedule && schedule.occurring_at?(usertime)
end
end
end