Skip to content
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

Improve PerformableMethod logging #1187

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

qpSHiNqp
Copy link

Just a small logging improvement for PerformableMethod.
This PR adds warning message when Object#delay is called with a block given.

Use case:
The code below won't perform as intended because blocks cannot be serialized and thus a job will ignore the block.

SomeModel.first.delay.tap do |record|
  record.touch # => raises "LocalJumpError: no block given"
end

I think it is convenient to display a warning like Ignored the block XXX because it cannot be serialized. when developers using the gem accidentally give block.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant