Skip to content

Commit

Permalink
Merge branch '4.x' into develop
Browse files Browse the repository at this point in the history
# Conflicts:
#	CHANGELOG.md
#	composer.json
  • Loading branch information
bencroker committed Jun 27, 2024
2 parents 8aa96ae + b95943d commit 2baddda
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -248,13 +248,13 @@
// - `3`: Append "served by" comment only
//'outputComments' => true,

// The priority to give the refresh cache job (the lower the number, the higher the priority). Set to `null` to inherit the default priority.
// The priority to give the refresh cache job (the lower the number, the higher the priority). If set to `null`, the default job priority will be used.
//'refreshCacheJobPriority' => 10,

//The batch size to use for driver jobs that support batching.
//'driverJobBatchSize' => 100,

// The priority to give driver jobs (the lower the number, the higher the priority). Set to `null` to inherit the default priority.
// The priority to give driver jobs (the lower the number, the higher the priority). If set to `null`, the default job priority will be used.
//'driverJobPriority' => 100,

// The time to reserve for queue jobs in seconds.
Expand Down
2 changes: 1 addition & 1 deletion src/jobs/GenerateCacheJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function canRetry($attempt, $error): bool
public function execute($queue): void
{
// Decrement (increase) priority so that subsequent batches are prioritised.
if ($this->itemOffset === 0) {
if ($this->itemOffset === 0 && $this->priority > 0) {
$this->priority--;
}

Expand Down
8 changes: 4 additions & 4 deletions src/models/SettingsModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -428,19 +428,19 @@ class SettingsModel extends Model
public int|bool $outputComments = true;

/**
* The priority to give the refresh cache job (the lower the number, the higher the priority).
* The priority to give the refresh cache job (the lower the number, the higher the priority). If set to `null`, the default job priority will be used.
*/
public int $refreshCacheJobPriority = 10;
public ?int $refreshCacheJobPriority = 10;

/**
* The batch size to use for driver jobs that support batching.
*/
public int $driverJobBatchSize = 100;

/**
* The priority to give driver jobs (the lower the number, the higher the priority).
* The priority to give driver jobs (the lower the number, the higher the priority). If set to `null`, the default job priority will be used.
*/
public int $driverJobPriority = 100;
public ?int $driverJobPriority = 100;

/**
* The time to reserve for queue jobs in seconds.
Expand Down

0 comments on commit 2baddda

Please sign in to comment.