• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

daycry / jobs / 22352579799

09 Feb 2026 05:28PM UTC coverage: 54.117% (-2.0%) from 56.107%
22352579799

push

github

daycry
Pass backend job ID into Job objects

Add a jobId field and getter/setter to IdentityTrait and populate it when creating Job instances from queue records. QueueRunCommand now injects the backend queue entity ID into the Job, and SyncQueue sets the job ID for in-process jobs; SyncQueue also removes an unused import and updates removeJob's type hint to use Job. Minor whitespace cleanup in DatabaseQueue.

4 of 5 new or added lines in 3 files covered. (80.0%)

44 existing lines in 2 files now uncovered.

1137 of 2101 relevant lines covered (54.12%)

4.49 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/Models/JobsLogModel.php
1
<?php
2

3
declare(strict_types=1);
4

5
/**
6
 * This file is part of Daycry Queues.
7
 *
8
 * (c) Daycry <daycry9@proton.me>
9
 *
10
 * For the full copyright and license information, please view
11
 * the LICENSE file that was distributed with this source code.
12
 */
13

14
namespace Daycry\Jobs\Models;
15

16
use CodeIgniter\Database\ConnectionInterface;
17
use CodeIgniter\Model;
18
use CodeIgniter\Validation\ValidationInterface;
19
use Config\Database;
20

21
/**
22
 * Model for persisted job execution logs (file alternative uses JSON).
23
 */
24
class JobsLogModel extends Model
25
{
26
    protected $primaryKey       = 'id';
27
    protected $useAutoIncrement = true;
28
    protected $returnType       = 'object';
29
    protected $useSoftDeletes   = false;
30
    protected $allowedFields    = [
31
        'name', 'job', 'payload', 'environment', 'output', 'error',
32
        'start_at', 'end_at', 'duration', 'test_time',
33
        // Extended fields
34
        'executionId', 'attempt', 'queue', 'source', 'retryStrategy',
35
        'payloadHash', 'outputLength', 'status', 'data',
36
    ];
37
    protected $useTimestamps      = true;
38
    protected $createdField       = 'created_at';
39
    protected $updatedField       = 'updated_at';
40
    protected $deletedField       = 'deleted_at';
41
    protected $validationRules    = [];
42
    protected $validationMessages = [];
43
    protected $skipValidation     = false;
44

45
    public function __construct(?ConnectionInterface &$db = null, ?ValidationInterface $validation = null)
46
    {
UNCOV
47
        if ($db === null) {
×
UNCOV
48
            $this->DBGroup = config('Jobs')->databaseGroup;
×
UNCOV
49
            $db            = Database::connect($this->DBGroup);
×
50
        }
51

UNCOV
52
        $this->table = config('Jobs')->tableName;
×
53

UNCOV
54
        parent::__construct($db, $validation);
×
55
    }
56
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc