Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add ability to restrict allowed job subclasses #22

Merged
merged 4 commits into from
Feb 8, 2024

Conversation

ianmjones
Copy link
Member

When a Job is popped off the queue, it is now checked to make sure it is a subclass of Job.

It is now possible to specify the Job subclasses that can be handled by a DatabaseConnection.

If Job data is found in the queue that is either not a Job subclass or not part of the optionally specified list of allowed Job subclasses, then Cron or Worker will refuse to process the Job, and it will be failed as an InvalidJobTypeException.

Copy link
Contributor

@eriktorsner eriktorsner left a comment

Choose a reason for hiding this comment

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

LGTM 👍 @ianmjones

@eriktorsner eriktorsner merged commit 2cc2007 into master Feb 8, 2024
3 checks passed
@ianmjones ianmjones deleted the allowed-job-classes branch February 8, 2024 14:32
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants