-
-
Notifications
You must be signed in to change notification settings - Fork 280
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix auto extend error when using an ActiveJob wrapper #213
Fix auto extend error when using an ActiveJob wrapper #213
Conversation
ActiveJob::QueueAdapters::ShoryukenAdapter::JobWrapper Could not auto extend the message ActiveJob::QueueAdapters::ShoryukenAdapter::JobWrapper/<queue_name>/<message> visibility timeout. Error: undefined method `[]' for nil:NilClass
@@ -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 \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line is too long. [138/120]
@@ -42,7 +42,9 @@ 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 \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Align the operands of a condition in an if
statement spanning multiple lines.
…ing multiple lines.`
&& 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @takeyuweb
So can body
be empty when `ActiveJob?
@takeyuweb hm good catch. I'm wondering if we should pass the cc/ @mariokostelac |
New code won't break, that's for sure. As far as I understand, ActiveJob can't be represented by a blank body. EDIT: |
I think we can just remove calling |
@takeyuweb thanks, I could check it deeper now and I understood. I branched from your branch and created #240 with your fix, and also starting to pass along Closing in favor of #240. |
* Fix auto extend error when using an ActiveJob wrapper ActiveJob::QueueAdapters::ShoryukenAdapter::JobWrapper Could not auto extend the message ActiveJob::QueueAdapters::ShoryukenAdapter::JobWrapper/<queue_name>/<message> visibility timeout. Error: undefined method `[]' for nil:NilClass * Fix `Line is too long. [138/120]` * Fix for `Align the operands of a condition in an "if statement" spanning multiple lines.` * Fix initialization when the Load Rails option is specified * Add rspec task See https://www.relishapp.com/rspec/rspec-core/docs/command-line/rake-task. * Fix NameError exception in AutoExtendVisibility When execute command `bundle exec shoryuken -C config/shoryuken.yml --rails`. > uninitialized constant Shoryuken::Middleware::Server::AutoExtendVisibility::MessageVisibilityExtender::Celluloid (NameError) * Reduce shutdown wait time * Run dispatch when processor done or dies * Daemonize before loading environment Daemonizing forks the process, which kills all other running threads. If your Rails app starts threads during initialization, they will currently be killed almost immediately. * Document producer setup (#188) * Add release date back on the change log * Bump version to 2.0.7 * Add new author * Load Celluloid before environment * Bump version to 2.0.8 * Fix error when initialize shoryuken daemonize * Fix daemonization broken in #219 * Bump version to 2.0.9 * Revert "Run dispatch when processor done or dies" (#226) This reverts commit f4640d9. * Bump version to 2.0.10 * I'm a completely stupid and removed the wrong version in rubygems * Update CHANGELOG to add 2.0.11 * Minor sample default_worker cleanup * Complementary fix for #213. Pass body to worker_name for calls from AutoExtendVisibility
When using auto extend