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

Return nil from Iteration#perform #418

Merged
merged 1 commit into from
Aug 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions lib/job-iteration/iteration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ def deserialize(job_data) # @private

def perform(*params) # @private
interruptible_perform(*params)

nil
end

def retry_job(*, **)
Expand Down
5 changes: 5 additions & 0 deletions test/unit/iteration_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,11 @@ def test_nested_each_iteration_instrumentation
assert_equal(expected, events)
end

def test_perform_returns_nil
# i.e. perform is "void", and nobody should depend on the return value
assert_nil(JobWithRightMethods.perform_now({}))
end

private

# Allows building job classes that read max_job_runtime during the test,
Expand Down