MCPcopy
hub / github.com/triggerdotdev/trigger.dev / calculateDeliverAt

Function calculateDeliverAt

apps/proxy/src/events/utils.ts:3–15  ·  view source on GitHub ↗
(options?: SendEventOptions)

Source from the content-addressed store, hash-verified

1import { SendEventOptions } from "@trigger.dev/core";
2
3export function calculateDeliverAt(options?: SendEventOptions) {
4 // If deliverAt is a string and a valid date, convert it to a Date object
5 if (options?.deliverAt) {
6 return options?.deliverAt;
7 }
8
9 // deliverAfter is the number of seconds to wait before delivering the event
10 if (options?.deliverAfter) {
11 return new Date(Date.now() + options.deliverAfter * 1000);
12 }
13
14 return undefined;
15}

Callers 2

queueEventsFunction · 0.90
queueEventFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…