Aggiunge monitoraggio ops: health check, log scanner, dashboard e notifiche.

Introduce incidenti con dedup, job Sidekiq ogni 3 min, scan log cron, /up/deep,
dashboard /admin/ops e push ntfy; include Sentry opzionale e fix test suite.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-12 08:16:47 +02:00
parent ce8939fffb
commit 52cfffb83f
44 changed files with 1396 additions and 24 deletions

View File

@@ -4,10 +4,10 @@ RSpec.describe Youtube::BroadcastService do
describe "#normalize_scheduled_start_time" do
subject(:service) { described_class.allocate }
it "usa tra ~90 secondi se scheduled_at è assente" do
it "usa tra ~20 secondi se scheduled_at è assente" do
travel_to Time.zone.parse("2026-06-03 20:00:00 UTC") do
t = service.send(:normalize_scheduled_start_time, nil)
expect(t).to eq(Time.utc(2026, 6, 3, 20, 1, 30))
expect(t).to eq(Time.utc(2026, 6, 3, 20, 0, 20))
end
end
@@ -15,7 +15,7 @@ RSpec.describe Youtube::BroadcastService do
travel_to Time.zone.parse("2026-06-03 20:00:00 UTC") do
past = Time.zone.parse("2026-06-03 10:00:00")
t = service.send(:normalize_scheduled_start_time, past)
expect(t).to eq(Time.utc(2026, 6, 3, 20, 1, 30))
expect(t).to eq(Time.utc(2026, 6, 3, 20, 0, 20))
end
end