Skip to content

Commit

Permalink
disable Sidekiq dead letter box for Insights
Browse files Browse the repository at this point in the history
  • Loading branch information
svenfuchs committed Jan 21, 2019
1 parent 9d6a2c5 commit b2c64dc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion lib/travis/sidekiq.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ def insights(event, data)
insights_client.push(
'queue' => ENV['INSIGHTS_SIDEKIQ_QUEUE'] || 'insights',
'class' => 'Travis::Insights::Worker',
'args' => [:event, { event: event, data: data }]
'args' => [:event, { event: event, data: data }],
'dead' => false
)
end

Expand Down
9 changes: 6 additions & 3 deletions spec/travis/addons/handlers/insights_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@
::Sidekiq::Client.any_instance.expects(:push).with(
'queue' => 'insights',
'class' => 'Travis::Insights::Worker',
'args' => [:event, event: 'job:created', data: data]
'args' => [:event, event: 'job:created', data: data],
'dead' => false
)
handler.handle
end
Expand All @@ -87,7 +88,8 @@
::Sidekiq::Client.any_instance.expects(:push).with(
'queue' => 'insights',
'class' => 'Travis::Insights::Worker',
'args' => [:event, event: 'job:finished', data: data]
'args' => [:event, event: 'job:finished', data: data],
'dead' => false
)
handler.handle
end
Expand All @@ -101,7 +103,8 @@
::Sidekiq::Client.any_instance.expects(:push).with(
'queue' => 'insights',
'class' => 'Travis::Insights::Worker',
'args' => [:event, event: 'job:created', data: data.merge(created_at: restarted_at)]
'args' => [:event, event: 'job:created', data: data.merge(created_at: restarted_at)],
'dead' => false
)
handler.handle
end
Expand Down

0 comments on commit b2c64dc

Please sign in to comment.