mailery 0.10.0 → 0.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -2285,9 +2285,11 @@ function sha256(s) {
2285
2285
  }
2286
2286
 
2287
2287
  // src/server/runner/step.ts
2288
+ var DUE_SKEW_MS = 1e3;
2288
2289
  async function processOneRunStep(runId, ctx) {
2289
2290
  const run = await ctx.collections.flowRuns.findOne({ _id: runId });
2290
2291
  if (!run || run.status !== "active") return;
2292
+ if (run.nextActionAt && run.nextActionAt.getTime() > Date.now() + DUE_SKEW_MS) return;
2291
2293
  const flow = await ctx.collections.flows.findOne({ _id: run.flowId });
2292
2294
  if (!flow) {
2293
2295
  await failFlowRun(run, "flow_missing", ctx);
@@ -7590,7 +7592,7 @@ var DEDUPE_POLICIES = [
7590
7592
  ];
7591
7593
 
7592
7594
  // src/server/index.ts
7593
- var VERSION = "0.10.0" ;
7595
+ var VERSION = "0.10.1" ;
7594
7596
 
7595
7597
  export { DEDUPE_POLICIES, FLOW_STEP_KINDS, Mailer, MongoContactAdapter, NullProvider, PREDICATE_KINDS, RESERVED_VAR_KEYS, SEGMENT_FILTER_KINDS, SendGridProvider, VERSION, applyTracking, applyWebhookEvent, compileMailyTemplate, compileTemplate, computeDeliveryTime, createAdminRouter, createPublicRouter, defaultFlowStep, defaultPredicate, defaultSegmentFilter, defineVars, derivePlaintext, dispatchSend, ensureIndexes, getCollections, predicateKind, processNewlyFiredEventTriggers, processOneRunStep, renderTemplate, runTick, sha256Hex, signUnsubscribeToken, sweepStrandedFlowRuns, validateSenderDomain, varsJsonSchema, verifyUnsubscribeToken };
7596
7598
  //# sourceMappingURL=index.js.map