Skip to content

Commit

Permalink
Code comments
Browse files Browse the repository at this point in the history
  • Loading branch information
bencroker committed Mar 25, 2024
1 parent 3fed3d2 commit 49688d3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions src/jobs/GenerateCacheJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ class GenerateCacheJob extends BaseBatchedJob implements RetryableJobInterface
public array $siteUris;

/**
* @var Queue
* Used to set the progress on the appropriate queue.
*
* @see self::setProgressHandler()
*/
private Queue $queue;

Expand Down Expand Up @@ -54,11 +56,10 @@ public function canRetry($attempt, $error): bool
}

/**
* Generates the cache for the site URIs in one go.
* Generates the cache for a batch of site URIs in one go.
*/
public function execute($queue): void
{
// TODO: move this into the `BaseBatchedJob::before` method in Blitz 5.
// Decrement (increase) priority so that subsequent batches are prioritised.
if ($this->itemOffset === 0) {
$this->priority--;
Expand Down
4 changes: 2 additions & 2 deletions tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ composer require markhuot/craft-pest-core:^2.0.0-rc2 --dev
Then run the following command from the root of your project.

```shell
php php vendor/bin/pest --configuration=vendor/putyourlightson/craft-blitz/tests/pest/phpunit.xml --test-directory=vendor/putyourlightson/craft-blitz/tests/pest
php vendor/bin/pest --configuration=vendor/putyourlightson/craft-blitz/tests/pest/phpunit.xml --test-directory=vendor/putyourlightson/craft-blitz/tests/pest
```

Or to run a specific test.

```shell
php php vendor/bin/pest --configuration=vendor/putyourlightson/craft-blitz/tests/pest/phpunit.xml --test-directory=vendor/putyourlightson/craft-blitz/tests/pest --filter=CacheRequestTest
php vendor/bin/pest --configuration=vendor/putyourlightson/craft-blitz/tests/pest/phpunit.xml --test-directory=vendor/putyourlightson/craft-blitz/tests/pest --filter=CacheRequestTest
```

0 comments on commit 49688d3

Please sign in to comment.