Skip to content

Standardize application job definitions - #1289

Open
outdooracorn wants to merge 2 commits into
mainfrom
ollie-use-job-base-class
Open

outdooracorn wants to merge 2 commits into
mainfrom
ollie-use-job-base-class

Conversation

@outdooracorn

@outdooracorn outdooracorn commented Oct 6, 2026 •

Copy link
Copy Markdown
Member
  • Use Illuminate\Foundation\Queue\Queueable in App\Jobs\Job so every application job receives the same dispatching, queue interaction, queue configuration, and model serialization behavior from a single source.
  • Convert relevant Jobs to inherit from this shared abstract base class.
  • Remove interfaces and traits that are not-used or already specified by the the abstract base class.
  • Add an architecture test to check that all queueable jobs extend App\Jobs\Job.

Having consistent job behaviour will make it easier to reason about the codebase and ensure shared configuration is applied centrally.

Bug: T440286

Remove the no-longer-used `DispatchesJobs` trait from `QueueSearchIndexBatches`.

The `$this->dispatch()` statement that was making use of this trait was removed in 00c5872 as part of the Laravel 10 upgrade.

Bug: T440286
@outdooracorn outdooracorn self-assigned this Oct 6, 2026
* Use `Illuminate\Foundation\Queue\Queueable` in `App\Jobs\Job` so every application job receives the same dispatching, queue interaction, queue configuration, and model serialization behavior from a single source.
* Convert relevant Jobs to inherit from this shared base.
* Add an architecture test to check that all queueable jobs extend `App\Jobs\Job`.

Bug: T440286
@outdooracorn
outdooracorn force-pushed the ollie-use-job-base-class branch from f67a007 to 025181a Compare October 6, 2026 12:01
@outdooracorn
outdooracorn added this pull request to stack #1291 October 6, 2026 21:49
@deer-wmde

Copy link
Copy Markdown
Contributor

Oh this is marvelous refactoring, thank you Ollie!

One thing I'm not sure about is how the Job Classes that now would extend the base Job class behave with regards to how the queue workers are started (60s vs 90s timeout, also not quite sure with the retries): https://github.com/wbstack/api/blob/main/start.sh#L24
But I'm not expecting that to cause much trouble - lets try it!

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