@camunda8/orchestration-cluster-api 10.0.0-alpha.40 → 10.0.0-alpha.41

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.
@@ -14234,7 +14234,7 @@ function createLogger(opts = {}) {
14234
14234
  }
14235
14235
 
14236
14236
  // src/runtime/version.ts
14237
- var packageVersion = "10.0.0-alpha.40";
14237
+ var packageVersion = "10.0.0-alpha.41";
14238
14238
 
14239
14239
  // src/runtime/supportLogger.ts
14240
14240
  var NoopSupportLogger = class {
@@ -15840,7 +15840,7 @@ var JobWorker = class {
15840
15840
  };
15841
15841
 
15842
15842
  // src/runtime/jobActions.ts
15843
- function enrichActivatedJob(raw, client2, log) {
15843
+ function enrichActivatedJob(raw, client2, log, clock = client2.clock) {
15844
15844
  let acknowledged = false;
15845
15845
  const ack = () => {
15846
15846
  if (!acknowledged) {
@@ -15848,7 +15848,11 @@ function enrichActivatedJob(raw, client2, log) {
15848
15848
  job.acknowledged = true;
15849
15849
  }
15850
15850
  };
15851
- const job = { ...raw, log };
15851
+ const job = {
15852
+ ...raw,
15853
+ log,
15854
+ clock: { now: () => clock.now(), sleep: (ms, signal) => clock.sleep(ms, signal) }
15855
+ };
15852
15856
  job.complete = async (variables = {}, result) => {
15853
15857
  try {
15854
15858
  await client2.completeJob({
@@ -16094,7 +16098,7 @@ var ThreadedJobWorker = class {
16094
16098
  const data = {};
16095
16099
  for (const [key, value] of Object.entries(raw)) {
16096
16100
  if (typeof value === "function") continue;
16097
- if (key === "log") continue;
16101
+ if (key === "log" || key === "clock") continue;
16098
16102
  data[key] = value;
16099
16103
  }
16100
16104
  return JSON.parse(JSON.stringify(data));