Tags: AppsDevTeam/background-queue
Tags
Publishes queue on transaction commit Ensures background queue messages are only published to the broker when the outermost database transaction commits successfully. This is achieved by tracking the transaction nesting level and publishing the queue only when the level returns to zero.
Improves background queue reliability and efficiency Refactors the background queue to enhance reliability and efficiency by: - Adding connection checks and reconnection logic to prevent job loss due to database connection issues. - Implementing bulk processing for database operations to reduce the number of queries. - Removing transaction management from the queue itself to rely on the application's transaction boundaries. - Adding a dedicated connection for the consumer to allow updating job status even during application transaction rollbacks. - Adding ext-pdo dependency.
Adapts to different Doctrine versions Checks if the `executeStatement` method exists before calling it, and falls back to `executeUpdate` for older Doctrine versions where `executeStatement` is not available. This ensures compatibility with a broader range of Doctrine versions.
Updates connection handling in BackgroundQueue Updates the BackgroundQueue to directly use the connection object provided in the configuration. This simplifies the connection process and relies on the consumer to pass an already established connection, removing the need for connection creation within the class.
PreviousNext