deliciousbrains / wp-queue

Job queues for WordPress
MIT License
170 stars 38 forks source link

Add ability to restrict allowed job subclasses #22

Closed ianmjones closed 9 months ago

ianmjones commented 9 months ago

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.