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

Cop idea: Prefer perform_async over perform_at or perform_in #16

Open
ydakuka opened this issue Sep 16, 2023 · 0 comments
Open

Cop idea: Prefer perform_async over perform_at or perform_in #16

ydakuka opened this issue Sep 16, 2023 · 0 comments

Comments

@ydakuka
Copy link

ydakuka commented Sep 16, 2023

References:

https://www.mikeperham.com/2021/11/07/whats-new-in-sidekiq-6.3/#activejob-compatibility

https://github.com/sidekiq/sidekiq/blob/main/Changes.md#630

# bad
SomeJob.perform_in(5.minutes, 1, 2, 3)
SomeJob.perform_at(5.days.from_now, 1, 2, 3)

# good
SomeJob.set(wait: 5.minutes).perform_async(1, 2, 3)
SomeJob.set(wait_until: 5.days.from_now).perform_async(1, 2, 3)
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

No branches or pull requests

1 participant