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

daycry / jobs / 21145580946

19 Jan 2026 04:55PM UTC coverage: 58.025% (-4.5%) from 62.567%
21145580946

push

github

daycry
Add security, performance, and health features; simplify architecture

Introduces shell command whitelisting, smart token detection, per-queue rate limiting, dead letter queue, job timeout protection, config caching, and a health monitoring command. Refactors architecture by consolidating traits, removing the CompletionStrategy pattern, and unifying retry policies under RetryPolicyFixed. Updates documentation and tests to reflect new features and architectural changes, ensuring backward compatibility and improved reliability.

143 of 340 new or added lines in 20 files covered. (42.06%)

1 existing line in 1 file now uncovered.

1193 of 2056 relevant lines covered (58.03%)

4.44 hits per line

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

11.11
/src/Exceptions/JobException.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\Exceptions;
15

16
use CodeIgniter\Exceptions\RuntimeException;
17

18
/**
19
 * Domain-specific exceptions for job definition & execution validation.
20
 * Provides named constructors for clearer intent at throw sites.
21
 */
22
class JobException extends RuntimeException
23
{
24
    public static function forInvalidJob(string $job): self
25
    {
26
        return new self("The job '{$job}' is not valid.");
2✔
27
    }
28

29
    public static function TaskAlreadyRunningException(string $job): self
30
    {
31
        return new self("The job '{$job}' is already running.");
×
32
    }
33

34
    public static function forInvalidLogType(): self
35
    {
36
        return new self('The log type is not valid.');
×
37
    }
38

39
    public static function validationError($errors)
40
    {
41
        return new self($errors);
×
42
    }
43

44
    public static function forInvalidMethod(string $method)
45
    {
46
        return new self(lang('HTTP.methodNotFound', [$method]));
×
47
    }
48

49
    public static function forInvalidPriority(int $priority)
50
    {
51
        return new self("The priority '{$priority}' is not valid. It must be between 0 and 10.");
×
52
    }
53

54
    public static function forShellCommandNotAllowed(string $command)
55
    {
NEW
56
        return new self("Shell command '{$command}' is not in the whitelist of allowed commands.");
×
57
    }
58

59
    public static function forJobTimeout(string $jobName, int $timeout)
60
    {
NEW
61
        return new self("Job '{$jobName}' exceeded maximum execution time of {$timeout} seconds.");
×
62
    }
63

64
    public static function forRateLimitExceeded(string $queue, int $limit)
65
    {
NEW
66
        return new self("Queue '{$queue}' has exceeded rate limit of {$limit} jobs per minute.");
×
67
    }
68
}
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