Skip to content

Commit

Permalink
Merge pull request #418 from Shopify/return-nil-from-perform
Browse files Browse the repository at this point in the history
  • Loading branch information
sambostock authored Aug 18, 2023
2 parents 1adae74 + 0395d2f commit 20ff243
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
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

0 comments on commit 20ff243

Please sign in to comment.