Skip to content

Add base Job class #92

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

Merged
merged 3 commits into from
Mar 17, 2025
Merged

Add base Job class #92

merged 3 commits into from
Mar 17, 2025

Conversation

pprkut
Copy link
Collaborator

@pprkut pprkut commented Mar 5, 2025

This replaces Resque\Job\JobInterface with an abstract Resque\Job\Job class. The abstract class is much more useful, as we can define the properties that we set on Jobs (which fixes deprecation warnings with PHP 8.2), as well as provide default implementation for setUp() and tearDown().

The one behavior change here is that I changed perform() from a boolean return value to void. The actual impact here is minimal, as it would only affect Jobs that chose to return false for some reason. There was no unit test for such a case, so I don't think it's a problem.

@danhunsaker danhunsaker merged commit 7e03f6e into resque:develop Mar 17, 2025
10 checks passed
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.

2 participants