From 6c46aaeef67264d4d8bcb6ddfcac8c9b67014503 Mon Sep 17 00:00:00 2001 From: Yuichi Takeuchi Date: Mon, 23 May 2016 11:06:46 +0900 Subject: [PATCH 1/3] Fix auto extend error when using an ActiveJob wrapper ActiveJob::QueueAdapters::ShoryukenAdapter::JobWrapper Could not auto extend the message ActiveJob::QueueAdapters::ShoryukenAdapter::JobWrapper// visibility timeout. Error: undefined method `[]' for nil:NilClass --- lib/shoryuken/util.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/shoryuken/util.rb b/lib/shoryuken/util.rb index 7c0026b0..59342dab 100644 --- a/lib/shoryuken/util.rb +++ b/lib/shoryuken/util.rb @@ -42,7 +42,8 @@ def worker_name(worker_class, sqs_msg, body = nil) && !sqs_msg.is_a?(Array) \ && sqs_msg.message_attributes \ && sqs_msg.message_attributes['shoryuken_class'] \ - && sqs_msg.message_attributes['shoryuken_class'][:string_value] == ActiveJob::QueueAdapters::ShoryukenAdapter::JobWrapper.to_s + && sqs_msg.message_attributes['shoryuken_class'][:string_value] == ActiveJob::QueueAdapters::ShoryukenAdapter::JobWrapper.to_s \ + && body "ActiveJob/#{body['job_class']}" else From 3a51d495343ea83f898b56c743a288ea47d690e0 Mon Sep 17 00:00:00 2001 From: Yuichi Takeuchi Date: Mon, 23 May 2016 11:29:42 +0900 Subject: [PATCH 2/3] Fix `Line is too long. [138/120]` --- lib/shoryuken/util.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/shoryuken/util.rb b/lib/shoryuken/util.rb index 59342dab..a83c24a5 100644 --- a/lib/shoryuken/util.rb +++ b/lib/shoryuken/util.rb @@ -42,7 +42,8 @@ def worker_name(worker_class, sqs_msg, body = nil) && !sqs_msg.is_a?(Array) \ && sqs_msg.message_attributes \ && sqs_msg.message_attributes['shoryuken_class'] \ - && sqs_msg.message_attributes['shoryuken_class'][:string_value] == ActiveJob::QueueAdapters::ShoryukenAdapter::JobWrapper.to_s \ + && sqs_msg.message_attributes['shoryuken_class'][:string_value] == \ + ActiveJob::QueueAdapters::ShoryukenAdapter::JobWrapper.to_s \ && body "ActiveJob/#{body['job_class']}" From ca192b4b93c3c82de0a949a0ca670f7ae349dcf9 Mon Sep 17 00:00:00 2001 From: Yuichi Takeuchi Date: Mon, 23 May 2016 11:38:05 +0900 Subject: [PATCH 3/3] Fix for `Align the operands of a condition in an "if statement" spanning multiple lines.` --- lib/shoryuken/util.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/shoryuken/util.rb b/lib/shoryuken/util.rb index a83c24a5..4bb25e7a 100644 --- a/lib/shoryuken/util.rb +++ b/lib/shoryuken/util.rb @@ -42,8 +42,8 @@ def worker_name(worker_class, sqs_msg, body = nil) && !sqs_msg.is_a?(Array) \ && sqs_msg.message_attributes \ && sqs_msg.message_attributes['shoryuken_class'] \ - && sqs_msg.message_attributes['shoryuken_class'][:string_value] == \ - ActiveJob::QueueAdapters::ShoryukenAdapter::JobWrapper.to_s \ + && sqs_msg.message_attributes['shoryuken_class'][:string_value] \ + == ActiveJob::QueueAdapters::ShoryukenAdapter::JobWrapper.to_s \ && body "ActiveJob/#{body['job_class']}"