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

daycry / jobs / 20573383244

19 Nov 2025 03:37PM UTC coverage: 60.218% (-2.3%) from 62.5%
20573383244

push

github

daycry
- Improvements

22 of 25 new or added lines in 12 files covered. (88.0%)

46 existing lines in 3 files now uncovered.

1105 of 1835 relevant lines covered (60.22%)

4.63 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