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
-`client` - If you need to override the Cloud Tasks client, pass the client here. (eg: changing credentials, transport etc)
187
202
188
-
### Task level default options
203
+
####Task level default options
189
204
190
205
Usage:
191
206
@@ -213,15 +228,15 @@ def mySimpleTask():
213
228
return {}
214
229
```
215
230
216
-
### Delayer Options
231
+
####Delayer Options
217
232
218
233
Usage:
219
234
220
235
```python
221
236
mySimpleTask.options(...).delay()
222
237
```
223
238
224
-
All options from above can be overriden per call (including TaskRouteBuilder options like `base_url`) with kwargs to the `options` function before calling delay.
239
+
All options from above can be overriden per call (including DelayedRouteBuilder options like `base_url`) with kwargs to the `options` function before calling delay.
We might need to override things in the task being sent to Cloud Tasks. The `pre_create_hook` allows us to do that.
236
268
237
269
Some hooks are included in the library.
238
270
239
-
-`oidc_hook`- Used to work with Cloud Run.
240
-
-`deadline_hook` - Used to change the timeout for the worker of a task. (PS: this deadline is decided by the sender to the queue and not the worker)
271
+
-`oidc_delayed_hook` / `oidc_scheduled_hook`- Used to pass OIDC token (for Cloud Run etc).
272
+
-`deadline_delayed_hook` / `deadline_scheduled_hook` - Used to change the timeout for the worker of a task. (PS: this deadline is decided by the sender to the queue and not the worker)
241
273
-`chained_hook` - If you need to chain multiple hooks together, you can do that with `chained_hook(hook1, hook2)`
242
274
243
275
## Future work
244
276
245
277
- Ensure queue exists.
246
-
- Integrate with [Cloud Scheduler](https://cloud.google.com/scheduler/) to replace celery beat.
0 commit comments