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
This package requires Laravel 10 or higher and supports MySQL 8 and PostgreSQL 15. Might support older database versions too, but package hasn't been tested for it.
20
+
This package requires Laravel 10 or 11.
25
21
26
-
Please check the [Laravel support policy](https://laravel.com/docs/master/releases#support-policy) table for supported
27
-
Laravel and PHP versions.
28
-
</details>
29
-
<details>
30
-
<summary>Installation</summary>
31
-
<br>
22
+
### Installation
32
23
33
24
Require the package using Composer
34
25
@@ -63,15 +54,14 @@ Add a new queue connection to `config/queue.php`
63
54
],
64
55
```
65
56
66
-
If you are using separate services for dispatching and handling tasks, you may want to change the following settings:
57
+
If you are using separate services for dispatching and handling tasks, and your application only dispatches jobs and should not be able to handle jobs, you may disable the task handler from `config/cloud-tasks.php`:
Using Cloud Tasks as a Laravel queue driver is fundamentally different than other Laravel queue drivers, like Redis.
145
132
146
133
Typically a Laravel queue has a worker that listens to incoming jobs using the `queue:work` / `queue:listen` command.
@@ -149,53 +136,9 @@ your application with the job payload. There is no need to run a `queue:work/lis
149
136
150
137
#### Good to know
151
138
152
-
- Backoff, retries, max tries, retryUntil are all handled by Laravel. All these options are ignored in the Cloud Tasks
153
-
configuration.
154
-
155
-
</details>
156
-
<details>
157
-
<summary>Dashboard (beta)</summary>
158
-
<br>
159
-
The package comes with a beautiful dashboard that can be used to monitor all queued jobs.
160
-
161
-
162
-
<imgsrc="/assets/dashboard.png"width="100%">
139
+
Cloud Tasks has it's own retry configuration options: maximum number of attempts, retry duration, min/max backoff and max doublings. All of these options are ignored by this package. Instead, you may configure max attempts, retry duration and backoff strategy right from Laravel.
163
140
164
-
---
165
-
166
-
_Experimental_
167
-
168
-
The dashboard works by storing all outgoing tasks in a database table. When Cloud Tasks calls the application and this
169
-
package handles the task, we will automatically update the tasks' status, attempts
170
-
and possible errors.
171
-
172
-
There is probably a (small) performance penalty because each task dispatch and handling does extra database read and
173
-
writes.
174
-
Also, the dashboard has not been tested with high throughput queues.
175
-
176
-
---
177
-
178
-
179
-
To make use of it, enable it through the `.env` file:
The dashboard is accessible at the URI: /cloud-tasks
194
-
195
-
</details>
196
-
<details>
197
-
<summary>Authentication</summary>
198
-
<br>
141
+
### Authentication
199
142
200
143
Set the `GOOGLE_APPLICATION_CREDENTIALS` environment variable with a path to the credentials file.
201
144
@@ -210,20 +153,6 @@ works:
210
153
4. Cloud Tasks Task Deleter
211
154
5. Service Account User
212
155
213
-
</details>
214
-
<details>
215
-
<summary>Security</summary>
216
-
<br>
217
-
The job handler requires each request to have an OpenID token. In the installation step we set the service account email, and with that service account, Cloud Tasks will generate an OpenID token and send it along with the job payload to the handler.
218
-
219
-
This package verifies that the token is digitally signed by Google. Only Google Tasks will be able to call your handler.
0 commit comments