Skip to content

Commit 65cf29f

Browse files
Adjust queue config
1 parent bc92ffa commit 65cf29f

File tree

4 files changed

+7
-8
lines changed

4 files changed

+7
-8
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ Check the config file for special features such as queue configuration and light
2828
```
2929
php artisan requester:entries
3030
```
31-
This one basically does the same as `php please static:warm`. If you are using Static caching then **it's a good idea to add either one of these commands to your deploy script (e.g. Forge).** Deployments clear the static cache so this will rebuild it for all entries afterwards.
31+
If you are using Static caching then **it's a good idea to add this command to your deploy script (e.g. Forge).** Deployments clear the static cache so this will rebuild it for all entries afterwards.
3232
<br/><br/>
3333

3434
```
3535
php artisan requester:images
3636
```
37-
This one queues up jobs to visit every entry url and scan them for image urls, which will also then be queued as jobs for visiting. This process prepares all of your images in advance, but it can take a long time to run. You will usually only run this command once on initial deployment of the site, or after any major restructuring of asset filenames and folders. I do **not** recommend adding this to your deployment script as images rarely change.
37+
You will usually only run this command once on initial deployment of the site, or after any major restructuring of asset filenames and folders. I do **not** recommend adding this to your deployment script as images rarely change.
3838
<br/><br/>
3939

4040
```
@@ -45,7 +45,7 @@ Clears the configured queue. Be careful if using the default queue or a shared q
4545

4646
## Queues
4747

48-
This package utilises a Redis queue called **cacherequester**. You can configure the package to use whatever queue and connection that you prefer but it's probably best not to use a shared queue or the default queue.
48+
This package utilises the default queue connection and name. You can set up a separate queue name in the config.
4949

5050
The queue can be ran manually with this command:
5151

config/statamic-cache-requester.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,10 @@
1818
| Queue
1919
|--------------------------------------------------------------------------
2020
|
21-
| Define your queue settings here. I recommend redis but any queue is fine.
21+
| Define your queue settings here.
2222
|
2323
*/
24-
'queue_connection' => 'redis',
25-
'queue_name' => 'cacherequester',
24+
'queue_name' => env('STATAMIC_CACHE_REQUESTER_QUEUE_NAME', 'default'),
2625

2726
/*
2827
|--------------------------------------------------------------------------

src/Console/Commands/ClearRequestQueue.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class ClearRequestQueue extends Command
2828
*/
2929
public function handle()
3030
{
31-
$connection = config('statamic-cache-requester.queue_connection');
31+
$connection = config('queue.default');
3232
$queue = config('statamic-cache-requester.queue_name');
3333

3434
try {

src/Jobs/RequestUrl.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class RequestUrl implements ShouldQueue
5757
*/
5858
public function __construct(string $url, bool $processImages = false, string $requestType = 'get', array $postData = [])
5959
{
60-
$this->onConnection(config('statamic-cache-requester.queue_connection'));
60+
$this->onConnection(config('queue.default'));
6161
$this->onQueue(config('statamic-cache-requester.queue_name'));
6262

6363
$this->url = $this->applyUrlManipulations($url);

0 commit comments

Comments
 (0)