You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+24-90
Original file line number
Diff line number
Diff line change
@@ -21,7 +21,7 @@ This package allows Google Cloud Tasks to be used as the queue driver.
21
21
</summary>
22
22
23
23
<br>
24
-
This package requires Laravel 6 or higher.
24
+
This package requires Laravel 6 or higher and supports MySQL 8 and PostgreSQL 14. Might support older database versions too, but package hasn't been tested for it.
25
25
26
26
Please check the table below for supported Laravel and PHP versions:
27
27
@@ -36,18 +36,15 @@ Please check the table below for supported Laravel and PHP versions:
| `STACKKIT_CLOUD_TASKS_PROJECT` | The project your queue belongs to. |`my-project`
84
-
| `STACKKIT_CLOUD_TASKS_LOCATION` | The region where the AppEngine is hosted |`europe-west6`
85
-
| `STACKKIT_CLOUD_TASKS_QUEUE` | The queue a job will be added to |`emails`
86
-
| `STACKKIT_CLOUD_TASKS_SERVICE_EMAIL` | The email address of the AppEngine service account. Important, it should have the correct roles. See the section below which roles. |`[email protected]`
87
-
| `STACKKIT_CLOUD_TASKS_HANDLER` (optional) | The URL that Cloud Tasks will call to process a job. This should be the URL to your Laravel app with the `handle-task` path added. By default we will use the URL that dispatched the job. |`https://<your website>.com/handle-task`
| `STACKKIT_CLOUD_TASKS_PROJECT` | The project your queue belongs to. |`my-project`
71
+
| `STACKKIT_CLOUD_TASKS_LOCATION` | The region where the project is hosted |`europe-west6`
72
+
| `STACKKIT_CLOUD_TASKS_QUEUE` | The default queue a job will be added to |`emails`
73
+
| `STACKKIT_CLOUD_TASKS_SERVICE_EMAIL` | The email address of the service account. Important, it should have the correct roles. See the section below which roles. |`[email protected]`
74
+
| `STACKKIT_CLOUD_TASKS_HANDLER` (optional) | The URL that Cloud Tasks will call to process a job. This should be the URL to your Laravel app. By default we will use the URL that dispatched the job. |`https://<your website>.com`
88
75
</details>
89
76
<details>
90
77
<summary>
@@ -95,8 +82,6 @@ Please check the table below on what the values mean and what their value should
95
82
96
83
Typically a Laravel queue has a worker that listens to incoming jobs using the `queue:work` / `queue:listen` command.
97
84
With Cloud Tasks, this is not the case. Instead, Cloud Tasks will schedule the job for you and make an HTTP request to your application with the job payload. There is no need to run a `queue:work/listen` command.
98
-
99
-
For more information on how to configure the Cloud Tasks queue, read the next section [Configuring the queue](#configuring-the-queue)
100
85
</details>
101
86
<details>
102
87
<summary>Dashboard (beta)</summary>
@@ -112,7 +97,7 @@ _Experimental_
112
97
113
98
The dashboard works by storing all outgoing tasks in a database table. When Cloud Tasks calls the application and this
114
99
package handles the task, we will automatically update the tasks' status, attempts
115
-
and possible exceptions.
100
+
and possible errors.
116
101
117
102
There is probably a (small) performance penalty because each task dispatch and handling does extra database read and writes.
118
103
Also, the dashboard has not been tested with high throughput queues.
@@ -129,10 +114,13 @@ To make use of it, enable it through the `.env` file:
129
114
130
115
Then publish its assets and migrations:
131
116
132
-
```php
117
+
```console
133
118
php artisan vendor:publish --tag=cloud-tasks
134
119
php artisan migrate
135
120
```
121
+
122
+
The dashboard is accessible at the URI: /cloud-tasks
123
+
136
124
</details>
137
125
<details>
138
126
<summary>Authentication</summary>
@@ -149,65 +137,6 @@ If you're not using your master service account (which has all abilities), you m
149
137
4. Cloud Tasks Task Deleter
150
138
5. Service Account User
151
139
</details>
152
-
<details>
153
-
<summary>Configuring the queue</summary>
154
-
<br>
155
-
When you first create a queue using `gcloud tasks queues create`, the default settings will look something like this:
156
-
157
-
```
158
-
rateLimits:
159
-
maxBurstSize: 100
160
-
maxConcurrentDispatches: 1000
161
-
maxDispatchesPerSecond: 500.0
162
-
retryConfig:
163
-
maxAttempts: 100
164
-
maxBackoff: 3600s
165
-
maxDoublings: 16
166
-
minBackoff: 0.100s
167
-
```
168
-
169
-
## Configurable settings
170
-
171
-
### maxBurstSize
172
-
173
-
Max burst size limits how fast tasks in queue are processed when many tasks are in the queue and the rate is high.
174
-
175
-
### maxConcurrentDispatches
176
-
177
-
The maximum number of concurrent tasks that Cloud Tasks allows to be dispatched for this queue
178
-
179
-
### maxDispatchesPerSecond
180
-
181
-
The maximum rate at which tasks are dispatched from this queue.
182
-
183
-
### maxAttempts
184
-
185
-
Number of attempts per task. Cloud Tasks will attempt the task max_attempts times (that is, if the first attempt fails, then there will be max_attempts - 1 retries). Must be >= -1.|
186
-
187
-
### maxBackoff
188
-
189
-
A task will be scheduled for retry between min_backoff and max_backoff duration after it fails
190
-
191
-
### maxDoublings
192
-
193
-
The time between retries will double max_doublings times.
194
-
195
-
A task's retry interval starts at min_backoff, then doubles max_doublings times, then increases linearly, and finally retries retries at intervals of max_backoff up to max_attempts times.
196
-
197
-
For example, if min_backoff is 10s, max_backoff is 300s, and max_doublings is 3, then the a task will first be retried in 10s. The retry interval will double three times, and then increase linearly by 2^3 * 10s. Finally, the task will retry at intervals of max_backoff until the task has been attempted max_attempts times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s, 240s, 300s, 300s, ....
198
-
199
-
## Recommended settings for Laravel
200
-
201
-
To simulate a single `queue:work/queue:listen` process, simply set the `maxConcurrentDispatches` to 1:
It's also allowed to remove this variable entirely in 3.x: The package will automatically use the application URL if the `STACKKIT_CLOUD_TASKS_HANDLER`
17
+
environment is not present. If you omit it, please ensure the [trusted proxy](https://laravel.com/docs/9.x/requests#configuring-trusted-proxies) have been configured
18
+
in your application. Otherwise, you might run into weird issues. :-)
0 commit comments