Skip to content

[2.x] feat: DatabaseQueue support, queue settings in advanced page#4270

Merged
imorland merged 6 commits into2.xfrom
im/database-queue
Nov 8, 2025
Merged

[2.x] feat: DatabaseQueue support, queue settings in advanced page#4270
imorland merged 6 commits into2.xfrom
im/database-queue

Conversation

@imorland
Copy link
Member

@imorland imorland commented Nov 8, 2025

Fixes #0000

Changes proposed in this pull request:

Docs: flarum/docs#495

By default, Flarum continues to use the synchronous queue. No action needed.

// config.php - Default behavior (no queue config)

<?php return [
    'url' => 'https://forum.example.com',
    'database' => [...],
    // Jobs execute synchronously (same as before)
];

For forum admins who wish to use the DatabaseQueue, this can be enabled:

// config.php - Specify database as the queue driver

<?php return [
    'url' => 'https://forum.example.com',
    'database' => [...],
    
    'queue' => [
        'driver' => 'database',
    ],
];

Also allows for 3rd party extensions to provide/bind their own queue implementation as required

Reviewers should focus on:

Screenshot
With DatabaseQueue active:
image
image

With default SyncQueue active:
image
image

Necessity

  • Has the problem that is being solved here been clearly explained?
  • If applicable, have various options for solving this problem been considered?
  • For core PRs, does this need to be in core, or could it be in an extension?
  • Are we willing to maintain this for years / potentially forever?

Confirmed

  • Frontend changes: tested on a local Flarum installation.
  • Backend changes: tests are green (run composer test).
  • Core developer confirmed locally this works as intended.
  • Tests have been added, or are not appropriate here.

Required changes:

  • Related documentation PR: (Remove if irrelevant)

@imorland imorland added this to the 2.0.0-beta.4 milestone Nov 8, 2025
@imorland imorland marked this pull request as ready for review November 8, 2025 19:48
@imorland imorland requested a review from a team as a code owner November 8, 2025 19:48
@imorland imorland merged commit 0ef6888 into 2.x Nov 8, 2025
28 checks passed
@imorland imorland deleted the im/database-queue branch November 8, 2025 20:01
imorland added a commit that referenced this pull request Jan 13, 2026
…4270)

* feat: queue settings in advanced page

* Apply fixes from StyleCI

* chore: add tests

* Apply fixes from StyleCI

* fix: test fails

* Apply fixes from StyleCI

---------

Co-authored-by: StyleCI Bot <bot@styleci.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants