From 5fd53382e15efe46f5144162f532908f07d83c0d Mon Sep 17 00:00:00 2001 From: Nate Berkopec Date: Tue, 5 Jan 2016 14:41:34 -0500 Subject: [PATCH] Fix DelayedJob with handlers Handlers are YAML, so if they're big, the event will get truncated and data will be lost. That's bad! Instead, just send the first 100 characters of the handler YAML. --- lib/raven/integrations/delayed_job.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/raven/integrations/delayed_job.rb b/lib/raven/integrations/delayed_job.rb index 0f1b35bd2..a0719e209 100644 --- a/lib/raven/integrations/delayed_job.rb +++ b/lib/raven/integrations/delayed_job.rb @@ -17,7 +17,9 @@ class Raven < ::Delayed::Plugin :id => job.id, :priority => job.priority, :attempts => job.attempts, - :handler => job.handler, + # handlers are YAML objects in strings, we definitely can't + # report all of that or the event will get truncated randomly + :handler => job.handler[0...100], :last_error => job.last_error, :run_at => job.run_at, :locked_at => job.locked_at,