From caaa3cf0a3f7a240baf47323167509a1fd4735af Mon Sep 17 00:00:00 2001 From: Jen Date: Mon, 16 Dec 2024 15:25:08 -0500 Subject: [PATCH] BL-1910 Ignore overnight errors in Honeybadger (#1153) --- config/initializers/honeybadger.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/initializers/honeybadger.rb b/config/initializers/honeybadger.rb index 124ce37b..3c39a0f9 100644 --- a/config/initializers/honeybadger.rb +++ b/config/initializers/honeybadger.rb @@ -4,8 +4,8 @@ Honeybadger.configure do |config| config.before_notify do |notice| # Ignore errors that occur during overnight maintenance - start_time = Time.parse("00:00").utc - end_time = Time.parse("03:30").utc + start_time = Time.now.utc.change(hour: 5, min: 0, sec: 0) + end_time = Time.now.utc.change(hour: 8, min: 30, sec: 0) current_time = Time.now.utc notice.halt! if current_time.between?(start_time, end_time)