Added delay to the docs and improved the ttl

This commit is contained in:
Matt Aitken
2024-07-10 10:28:49 +01:00
parent a6b5d2edc5
commit 98d5f005e4
+15 -8
View File
@@ -1500,17 +1500,24 @@ components:
description: An optional property that specifies the idempotency key used to prevent creating duplicate runs. If you provide an existing idempotency key, we will return the existing run ID.
ttl:
$ref: "#/components/schemas/TTL"
delay:
$ref: "#/components/schemas/Delay"
TTL:
oneOf:
- $ref: "#/components/schemas/TTLString"
- $ref: "#/components/schemas/TTLNumber"
TTLString:
type:
- string
- number
description: "The time-to-live for this run. If the run is not executed within this time, it will be removed from the queue and never execute. You can use a string in this format: `1h`, `1m`, `1h42m` or a number of seconds (min. 1)."
Delay:
type: string
description: "The time-to-live for this run. If the run is not executed within this time, it will be removed from the queue and never execute. You can use a string in this format: `1h`, `1m`, `1h42m` or a number of seconds."
TTLNumber:
type: number
description: "The time-to-live for this run. If the run is not executed within this time, it will be removed from the queue and never execute. You can use a number which is in seconds."
description: |
The delay before the task is executed. This can be a Date object, a string like `1h` or a date-time string.
* "1h" - 1 hour
* "30d" - 30 days
* "15m" - 15 minutes
* "2w" - 2 weeks
* "60s" - 60 seconds
* new Date("2025-01-01T00:00:00Z")
EnvFilter:
type: object
properties: