From 49688d3325f56067fc25464783534cba32be15d9 Mon Sep 17 00:00:00 2001 From: bencroker Date: Sun, 24 Mar 2024 20:43:03 -0600 Subject: [PATCH] Code comments --- src/jobs/GenerateCacheJob.php | 7 ++++--- tests/README.md | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/jobs/GenerateCacheJob.php b/src/jobs/GenerateCacheJob.php index ec7c3376..a84236b7 100644 --- a/src/jobs/GenerateCacheJob.php +++ b/src/jobs/GenerateCacheJob.php @@ -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; @@ -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--; diff --git a/tests/README.md b/tests/README.md index d83188cb..9e8211b3 100644 --- a/tests/README.md +++ b/tests/README.md @@ -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 ```