Skip to content

Bug: Queue Not Logging Failed Tasks with Transactions #41

@maniaba

Description

@maniaba

Issue Description:
I have identified a bug in the CodeIgniter 4 queue system. When a task fails during execution, and that task involves a transaction, it fails to log the failure in the designated log file.

class ExampleJob
{
    public function process(string $data):
    {
        $db = db_connect();
        
        $db->transStart(); // Start Transaction
            
       // Job logic here and get RuntimeException

    }
}

When a job fails to execute, the system fails to log the failure in the queue_jobs_failed table. Furthermore, when utilizing the DatabaseHandler, the job record remains unremoved from the queue_jobs table.

This oversight results in a lack of visibility into failed jobs and may lead to potential data inconsistency within the job management system.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions