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

Fix ActiveJob generator #326

Merged
merged 1 commit into from
May 25, 2021
Merged

Fix ActiveJob generator #326

merged 1 commit into from
May 25, 2021

Conversation

paracycle
Copy link
Member

Motivation

For Active Job classes, we were generating the signatures wrong in two ways:

  1. perform_later returns an instance of the job class, or false if the job couldn't be enqueued.
  2. perform_now returns the return value of perform immediately. It does not return an instance of the job class.

Implementation

Make relevant updates.

Tests

Updated existing tests.

For Active Job classes, we were generating the signature wrong in two
ways:

1. `perform_later` returns an instance of the job class, or `false`
if the job couldn't be enqueued.
2. `perform_now` returns the return value of `perform` immediately. It
does not return an instance of the job class.
@paracycle paracycle requested review from kddnewton and a team May 25, 2021 12:27
Copy link
Contributor

@kddnewton kddnewton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, TIL

@paracycle paracycle merged commit 8212e5b into master May 25, 2021
@paracycle paracycle deleted the uk-fix-activejob-generator branch May 25, 2021 14:42
@shopify-shipit shopify-shipit bot temporarily deployed to production May 25, 2021 22:53 Inactive
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

3 participants