Skip to content

Commit 3b7b87a

Browse files
committed
Cleanup README.md
1 parent cddb9b2 commit 3b7b87a

File tree

1 file changed

+16
-17
lines changed

1 file changed

+16
-17
lines changed

README.md

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -46,26 +46,24 @@ Please check the [Laravel support policy](https://laravel.com/docs/master/releas
4646
'queue' => env('STACKKIT_CLOUD_TASKS_QUEUE', 'default'),
4747
'service_account_email' => env('STACKKIT_CLOUD_TASKS_SERVICE_EMAIL', ''),
4848
'signed_audience' => env('STACKKIT_CLOUD_TASKS_SIGNED_AUDIENCE', true),
49+
50+
// Optional
51+
'credential_file' => env('STACKKIT_CLOUD_TASKS_CREDENTIAL_FILE', ''),
52+
53+
// Required when using AppEngine
54+
'app_engine' => env('STACKKIT_APP_ENGINE_TASK', false),
55+
'app_engine_service' => env('STACKKIT_APP_ENGINE_SERVICE', ''),
56+
57+
// Required when not using AppEngine
58+
'handler' => env('STACKKIT_CLOUD_TASKS_HANDLER', ''),
59+
'service_account_email' => env('STACKKIT_CLOUD_TASKS_SERVICE_EMAIL', ''),
60+
'signed_audience' => env('STACKKIT_CLOUD_TASKS_SIGNED_AUDIENCE', true),
61+
4962
// Optional: The deadline in seconds for requests sent to the worker. If the worker
5063
// does not respond by this deadline then the request is cancelled and the attempt
5164
// is marked as a DEADLINE_EXCEEDED failure.
5265
'dispatch_deadline' => null,
5366
'backoff' => 0,
54-
55-
'queue' => env('STACKKIT_CLOUD_TASKS_QUEUE', 'default'),
56-
'credential_file' => env('STACKKIT_CLOUD_TASKS_CREDENTIAL_FILE', ''),
57-
// Either you have an AppEngine task, and use these
58-
'app_engine' => env('STACKKIT_APP_ENGINE_TASK', false),
59-
'app_engine_service' => env('STACKKIT_APP_ENGINE_SERVICE', ''),
60-
// Else you get a HttpTask, and use these
61-
'handler' => env('STACKKIT_CLOUD_TASKS_HANDLER', ''),
62-
'service_account_email' => env('STACKKIT_CLOUD_TASKS_SERVICE_EMAIL', ''),
63-
'signed_audience' => env('STACKKIT_CLOUD_TASKS_SIGNED_AUDIENCE', true),
64-
// Optional: The deadline in seconds for requests sent to the worker. If the worker
65-
// does not respond by this deadline then the request is cancelled and the attempt
66-
// is marked as a DEADLINE_EXCEEDED failure.
67-
'dispatch_deadline' => null,
68-
'backoff' => 0,
6967
],
7068
```
7169

@@ -85,8 +83,10 @@ Please check the table below on what the values mean and what their value should
8583
| `STACKKIT_CLOUD_TASKS_LOCATION` | The region where the project is hosted. |`europe-west6`
8684
| `STACKKIT_CLOUD_TASKS_QUEUE` | The default queue a job will be added to. |`emails`
8785
| `STACKKIT_CLOUD_TASKS_CREDENTIAL_FILE` (optional) | A json credential file to authenticate the connection (from outside AppEngine) |`project-123.json`
86+
| **App Engine**
8887
| `STACKKIT_APP_ENGINE_TASK` (optional) | Set to true to use App Engine task (else a Http task will be used). Defaults to false. |`true`
8988
| `STACKKIT_APP_ENGINE_SERVICE` (optional) | The App Engine service to handle the task (only if using App Engine task). |`api`
89+
| **Non- App Engine apps**
9090
| `STACKKIT_CLOUD_TASKS_SERVICE_EMAIL` (optional) | The email address of the service account. Important, it should have the correct roles. See the section below which roles. |`my-service-account@appspot.gserviceaccount.com`
9191
| `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`
9292
| `STACKKIT_CLOUD_TASKS_SIGNED_AUDIENCE` (optional) | True or false depending if you want extra security by signing the audience of your tasks. May misbehave in certain Cloud Run setups. Defaults to true. | `true`
@@ -103,7 +103,6 @@ With Cloud Tasks, this is not the case. Instead, Cloud Tasks will schedule the j
103103

104104
#### Good to know
105105

106-
- If `STACKKIT_APP_ENGINE_TASK` is true, `STACKKIT_CLOUD_TASKS_SERVICE_EMAIL` and `STACKKIT_CLOUD_TASKS_HANDLER` will be ignored.
107106
- The "Min backoff" and "Max backoff" options in Cloud Tasks are ignored. This is intentional: Laravel has its own backoff feature (which is more powerful than what Cloud Tasks offers) and therefore I have chosen that over the Cloud Tasks one.
108107
- Similarly to the backoff feature, I have also chosen to let the package do job retries the 'Laravel way'. In Cloud Tasks, when a task throws an exception, Cloud Tasks will decide for itself when to retry the task (based on the backoff values). It will also manage its own state and knows how many times a task has been retried. This is different from Laravel. In typical Laravel queues, when a job throws an exception, the job is deleted and released back onto the queue. In order to support Laravel's backoff feature, this package must behave the same way about job retries.
109108

@@ -151,7 +150,7 @@ The dashboard is accessible at the URI: /cloud-tasks
151150
<summary>Authentication</summary>
152151
<br>
153152

154-
Set the `GOOGLE_APPLICATION_CREDENTIALS` environment variable with a path to the credentials file.
153+
Set the `STACKKIT_CLOUD_TASKS_CREDENTIAL_FILE` environment variable with a path to the credentials file.
155154

156155
More info: https://cloud.google.com/docs/authentication/production
157156

0 commit comments

Comments
 (0)