auths
objectreturn
or this.key = 'value'
, pass input data to your code viaparams
, and maintain state across executions with$checkpoint.async
(event, steps) => {
}
const startTs = +new Date()
const lastExecutionTs = $checkpoint
// If we receive a flood of events, they should be emitted one
// after another accordingly to our throttling rules. Stop these
// invocations as soon as we detect this case.
if (lastExecutionTs && (startTs - lastExecutionTs) < 60000) {
$end("Not running workflow. Too soon since last event")
}
// Save the current execution ts to $checkpoint
$checkpoint = startTs