`io.wait()` waits for the specified amount of time before continuing the Job. Delays work even if you're on a serverless platform with timeouts, or if your server goes down. They utilize [resumability](https://trigger.dev/docs/documentation/concepts/resumability) to ensure that the Run can be resume
(cacheKey: string | any[], seconds: number)
| 360 | * @param seconds The number of seconds to wait. This can be very long, serverless timeouts are not an issue. |
| 361 | */ |
| 362 | async wait(cacheKey: string | any[], seconds: number) { |
| 363 | return await this.runTask(cacheKey, async (task) => {}, { |
| 364 | name: "wait", |
| 365 | icon: "clock", |
| 366 | params: { seconds }, |
| 367 | noop: true, |
| 368 | delayUntil: new Date(Date.now() + seconds * 1000), |
| 369 | style: { style: "minimal" }, |
| 370 | }); |
| 371 | } |
| 372 | |
| 373 | async waitForEvent<T extends z.ZodTypeAny = z.ZodTypeAny>( |
| 374 | cacheKey: string | any[], |
no test coverage detected