#11343·bagisto

[2.4] Feature Enhancement: Admin Warning and Email Alert for Missing Queue Worker When QUEUE_CONNECTION is Not sync.

Author: kartikeywebkul9260Created Jun 16, 2026Updated Jul 7, 2026
LabelsFeature RequestInternalRefined

Here is an updated GitHub feature enhancement including the email notification idea:

Feature Enhancement: Admin Warning and Email Alert for Missing Queue Worker

Summary

Introduce a queue health monitoring mechanism that warns administrators when QUEUE_CONNECTION is configured with an asynchronous driver (e.g., database, redis) but no active queue worker is running.

Additionally, if any queue-related job is dispatched while the queue worker is unavailable, send an immediate non-queued email notification to the administrator informing them about the issue.

Problem Statement

Bagisto uses queue workers to process background tasks such as sending emails, indexing, imports/exports, and other asynchronous operations.

When QUEUE_CONNECTION is not set to sync and the queue worker is not running, jobs continue accumulating in the queue and remain unprocessed. This may lead to:

  • Emails not being sent.
  • Background jobs remaining in pending state.
  • Import/export processes getting stuck.
  • Delayed or failed asynchronous operations.

Currently, administrators may not realize that the queue worker has stopped or was never started.

Proposed Solution

1. Admin Panel Queue Health Warning

Add a health check that continuously verifies queue worker availability.

Display an admin warning such as:

Queue Worker Not Running

The application is configured to use the {{ QUEUE_CONNECTION }} queue driver, but no active queue worker has been detected. Background jobs may not be processed.

Please start the queue worker using:

php artisan queue:work

This warning should not be displayed when:

  • QUEUE_CONNECTION=sync
  • A healthy queue worker is detected.

2. Immediate Admin Email Notification (Non-Queued)

When an application attempts to dispatch a queue job and no active queue worker is detected:

  • Send a direct email to the administrator without using the queue system.

  • Include details such as:

    • Queue connection driver.
    • Job name or type that was dispatched.
    • Time of occurrence.
    • Server/environment details (optional).
    • Recommended action to restart the queue worker.

The email must be sent synchronously to avoid dependency on the failing queue system itself.

3. Prevent Repeated Notifications

To avoid excessive alerts:

  • Store the last notification timestamp.
  • Send the warning email only once within a configurable time period (e.g., every 30 or 60 minutes) until the queue worker becomes healthy again.

Benefits

  • Administrators receive immediate visibility of queue failures.
  • Prevents unnoticed delays in critical background operations.
  • Reduces troubleshooting time.
  • Improves reliability of email, import/export, and other asynchronous features.
  • Avoids notification loops by implementing throttling.

Expected Outcome

Whenever the system is configured to use asynchronous queues but no queue worker is available, administrators receive clear warnings in the admin panel and timely email alerts, allowing them to quickly restore queue processing.