mailery 0.10.1 → 0.10.2

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.cjs CHANGED
@@ -4834,7 +4834,7 @@ async function runSetupChecks(mailer) {
4834
4834
  const checks = [];
4835
4835
  checks.push(await checkMongo(mailer));
4836
4836
  checks.push(await checkQueue(mailer));
4837
- if (mailer.config.queue.driver !== "noop" && !mailer.config.workerless) {
4837
+ if (mailer.config.queue.driver !== "noop") {
4838
4838
  checks.push(await checkWorkersHeartbeat(mailer));
4839
4839
  }
4840
4840
  checks.push(await checkCircuitBreaker(mailer));
@@ -4899,13 +4899,14 @@ async function checkWorkersHeartbeat(mailer) {
4899
4899
  );
4900
4900
  const tickIntervalMs = mailer.config.tickIntervalSeconds * 1e3;
4901
4901
  const staleAfterMs = Math.max(tickIntervalMs * 3, 3e4);
4902
+ const workerless = mailer.config.workerless;
4902
4903
  if (!h) {
4903
4904
  return {
4904
4905
  name: "workers_heartbeat",
4905
4906
  label: "Background workers",
4906
4907
  severity: "warn",
4907
- message: "no tick has run yet",
4908
- hint: "If your separate worker process is started, the heartbeat will appear within one tick interval. If you forgot to run `mailer.startWorkers()`, sends will sit queued indefinitely."
4908
+ message: workerless ? "no tick has run yet (workers run in another process)" : "no tick has run yet",
4909
+ hint: workerless ? "This process is workerless; the heartbeat comes from your separate worker process. If that process is started, the heartbeat will appear within one tick interval \u2014 a fresh install legitimately has none yet." : "If your separate worker process is started, the heartbeat will appear within one tick interval. If you forgot to run `mailer.startWorkers()`, sends will sit queued indefinitely."
4909
4910
  };
4910
4911
  }
4911
4912
  const ageMs = Date.now() - new Date(h.updatedAt).getTime();
@@ -4915,14 +4916,14 @@ async function checkWorkersHeartbeat(mailer) {
4915
4916
  label: "Background workers",
4916
4917
  severity: "error",
4917
4918
  message: `last tick ${humanDuration(ageMs)} ago (expected within ${humanDuration(tickIntervalMs)})`,
4918
- hint: "Workers appear to be down. Sends and flow advancement are halted. Restart your worker process (`mailer.startWorkers()`)."
4919
+ hint: workerless ? "Workers run in another process, and that process appears to be down. Sends and flow advancement are halted. Restart the process that calls `mailer.startWorkers()`." : "Workers appear to be down. Sends and flow advancement are halted. Restart your worker process (`mailer.startWorkers()`)."
4919
4920
  };
4920
4921
  }
4921
4922
  return {
4922
4923
  name: "workers_heartbeat",
4923
4924
  label: "Background workers",
4924
4925
  severity: "ok",
4925
- message: `last tick ${humanDuration(ageMs)} ago`
4926
+ message: `last tick ${humanDuration(ageMs)} ago${workerless ? " (worker process)" : ""}`
4926
4927
  };
4927
4928
  }
4928
4929
  async function checkCircuitBreaker(mailer) {
@@ -7610,7 +7611,7 @@ var DEDUPE_POLICIES = [
7610
7611
  ];
7611
7612
 
7612
7613
  // src/server/index.ts
7613
- var VERSION = "0.10.1" ;
7614
+ var VERSION = "0.10.2" ;
7614
7615
 
7615
7616
  exports.DEDUPE_POLICIES = DEDUPE_POLICIES;
7616
7617
  exports.FLOW_STEP_KINDS = FLOW_STEP_KINDS;