Skip to content

Commit 1e2b5c8

Browse files
[8.x] Proofread queues.md (#6736)
A few typographical corrections to recently added text. Mainly just missing words/letters.
1 parent f9f3827 commit 1e2b5c8

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

queues.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ By default, unique jobs are "unlocked" after a job completes processing or fails
302302
<a name="unique-job-locks"></a>
303303
#### Unique Job Locks
304304

305-
Behind the scenes, when a `ShouldBeUnique` job is dispatched, Laravel attempts to acquire a [lock](/docs/{{version}}/cache#atomic-locks) with the `uniqueId` key. If the lock is not acquired, the job is not dispatched. This lock is released when the job completes processing or fails all of its retry attempts. By default, Laravel will use the default cache driver to obtain this lock. However, if you wish to use another driver for acquiring the lock, you may define a `uniqueVia` method the returns the cache driver that should be used:
305+
Behind the scenes, when a `ShouldBeUnique` job is dispatched, Laravel attempts to acquire a [lock](/docs/{{version}}/cache#atomic-locks) with the `uniqueId` key. If the lock is not acquired, the job is not dispatched. This lock is released when the job completes processing or fails all of its retry attempts. By default, Laravel will use the default cache driver to obtain this lock. However, if you wish to use another driver for acquiring the lock, you may define a `uniqueVia` method that returns the cache driver that should be used:
306306

307307
use Illuminate\Support\Facades\Cache;
308308

@@ -321,7 +321,7 @@ Behind the scenes, when a `ShouldBeUnique` job is dispatched, Laravel attempts t
321321
}
322322
}
323323

324-
> {tip} If only need to limit the concurrent processing of a job, use the [`WithoutOverlapping`](/docs/{{version}}/queues#preventing-job-overlaps) job middleware instead.
324+
> {tip} If you only need to limit the concurrent processing of a job, use the [`WithoutOverlapping`](/docs/{{version}}/queues#preventing-job-overlaps) job middleware instead.
325325
326326
<a name="job-middleware"></a>
327327
## Job Middleware
@@ -350,7 +350,7 @@ Job middleware allow you to wrap custom logic around the execution of queued job
350350

351351
While this code is valid, the implementation of the `handle` method becomes noisy since it is cluttered with Redis rate limiting logic. In addition, this rate limiting logic must be duplicated for any other jobs that we want to rate limit.
352352

353-
Instead of rate limiting in the handle method, we could define a job middleware that handles rate limiting. Laravel does not have a default location for job middleware, so you are welcome to place job middleware anywhere in your application. In this example, we will place the middleware in a `app/Jobs/Middleware` directory:
353+
Instead of rate limiting in the handle method, we could define a job middleware that handles rate limiting. Laravel does not have a default location for job middleware, so you are welcome to place job middleware anywhere in your application. In this example, we will place the middleware in an `app/Jobs/Middleware` directory:
354354

355355
<?php
356356

@@ -1272,7 +1272,7 @@ Without pruning, the `job_batches` table can accumulate records very quickly. To
12721272

12731273
$schedule->command('queue:prune-batches')->daily();
12741274

1275-
By default, all finished batches older that are more than 24 hours old will be pruned. You may use the `hours` option when calling the command to determine how long to retain batch data. For example, the following command will delete all batches that finished over 48 hours ago:
1275+
By default, all finished batches that are more than 24 hours old will be pruned. You may use the `hours` option when calling the command to determine how long to retain batch data. For example, the following command will delete all batches that finished over 48 hours ago:
12761276

12771277
$schedule->command('queue:prune-batches --hours=48')->daily();
12781278

@@ -1360,7 +1360,7 @@ The `--max-time` option may be used to instruct the worker to process jobs for t
13601360
<a name="worker-sleep-duration"></a>
13611361
#### Worker Sleep Duration
13621362

1363-
When jobs are available on the queue, the worker will keep processing jobs with no delay in between them. However, the `sleep` option determines how any seconds the worker will "sleep" if there are no new jobs available. While sleeping, the worker will not process any new jobs - the jobs will be processed after the worker wakes up again.
1363+
When jobs are available on the queue, the worker will keep processing jobs with no delay in between them. However, the `sleep` option determines how many seconds the worker will "sleep" if there are no new jobs available. While sleeping, the worker will not process any new jobs - the jobs will be processed after the worker wakes up again.
13641364

13651365
php artisan queue:work --sleep=3
13661366

@@ -1617,7 +1617,7 @@ To delete all of your failed jobs from the `failed_jobs` table, you may use the
16171617

16181618
When injecting an Eloquent model into a job, the model is automatically serialized before being placed on the queue and re-retrieved from the database when the job is processed. However, if the model has been deleted while the job was waiting to be processed by a worker, your job may fail with a `ModelNotFoundException`.
16191619

1620-
For convenience, you may choose to automatically delete jobs with missing models by setting your job's `deleteWhenMissingModels` property to `true`. When this model is set to `true`, Laravel will quietly discard the job without raising an exception:
1620+
For convenience, you may choose to automatically delete jobs with missing models by setting your job's `deleteWhenMissingModels` property to `true`. When this property is set to `true`, Laravel will quietly discard the job without raising an exception:
16211621

16221622
/**
16231623
* Delete the job if its models no longer exist.

0 commit comments

Comments
 (0)