@falcondev-oss/workflow 0.7.3 → 0.7.4

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.
Files changed (2) hide show
  1. package/dist/index.mjs +6 -8
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -9717,7 +9717,7 @@ var Workflow = class {
9717
9717
  const queue = await this.getOrCreateQueue();
9718
9718
  const worker = new Worker({
9719
9719
  handler: async (job) => {
9720
- Settings.logger?.info?.(`Processing workflow job ${job.id} of workflow ${this.opts.id}`);
9720
+ Settings.logger?.info?.(`[${this.opts.id}] Processing job ${job.id} `);
9721
9721
  const jobId = job.id;
9722
9722
  if (!jobId) throw new Error("Job ID is missing");
9723
9723
  const deserializedData = deserialize$1(job.data);
@@ -9741,7 +9741,7 @@ var Workflow = class {
9741
9741
  span
9742
9742
  });
9743
9743
  const end = performance.now();
9744
- Settings.logger?.success?.(`Completed workflow job ${job.id} of workflow ${this.opts.id} in ${(end - start).toFixed(2)} ms`);
9744
+ Settings.logger?.success?.(`[${this.opts.id}] Completed job ${job.id} in ${(end - start).toFixed(2)} ms`);
9745
9745
  return serialize$1(result);
9746
9746
  }, propagation.extract(ROOT_CONTEXT, deserializedData.tracingHeaders));
9747
9747
  },
@@ -9749,19 +9749,17 @@ var Workflow = class {
9749
9749
  ...this.opts.workerOptions,
9750
9750
  ...opts
9751
9751
  });
9752
- worker.on("ready", () => {
9753
- Settings.logger?.info?.(`Worker started for workflow ${this.opts.id}`);
9754
- });
9755
9752
  worker.on("failed", (job) => {
9756
- Settings.logger?.info?.(`Workflow job ${job.id} of workflow ${this.opts.id} failed`);
9753
+ Settings.logger?.info?.(`[${this.opts.id}] Job ${job.id} failed`);
9757
9754
  });
9758
9755
  worker.on("error", (error) => {
9759
- Settings.logger?.error?.(`Error during worker startup for workflow ${this.opts.id}:`, error);
9756
+ Settings.logger?.error?.(`[${this.opts.id}] Error during worker startup:`, error);
9760
9757
  });
9758
+ Settings.logger?.info?.(`[${this.opts.id}] Worker started`);
9761
9759
  const metricsOpts = opts?.metrics ?? this.opts.workerOptions?.metrics ?? Settings.metrics;
9762
9760
  if (metricsOpts) await this.setupMetrics(metricsOpts);
9763
9761
  asyncExitHook(async (signal) => {
9764
- Settings.logger?.info?.(`Received ${signal}, shutting down worker for workflow ${this.opts.id}...`);
9762
+ Settings.logger?.info?.(`[${this.opts.id}] Received ${signal}, shutting down worker...`);
9765
9763
  await worker.close();
9766
9764
  }, { wait: 1e4 });
9767
9765
  return this;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@falcondev-oss/workflow",
3
3
  "type": "module",
4
- "version": "0.7.3",
4
+ "version": "0.7.4",
5
5
  "description": "Simple type-safe queue worker with durable execution using Redis.",
6
6
  "license": "MIT",
7
7
  "repository": "github:falcondev-oss/workflow",