@punks/backend-entity-manager 0.0.290 → 0.0.291

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.
@@ -9,6 +9,6 @@ export declare class JobDispatchHandler implements ICommandHandler<JobDispatchCo
9
9
  private readonly instances;
10
10
  private readonly logger;
11
11
  constructor(lock: OperationLockService, executor: JobProviderExecutor, instances: IJobInstancesRepository);
12
- execute(command: JobDispatchCommand): Promise<void>;
12
+ execute(command: JobDispatchCommand): Promise<import("../../abstractions").JobInstance | undefined>;
13
13
  private dispatchJob;
14
14
  }
package/dist/esm/index.js CHANGED
@@ -33942,10 +33942,11 @@ let JobDispatchHandler = JobDispatchHandler_1 = class JobDispatchHandler {
33942
33942
  }
33943
33943
  async execute(command) {
33944
33944
  const { input: { job }, } = command;
33945
- await this.lock.executeExclusive({
33945
+ const result = await this.lock.executeExclusive({
33946
33946
  lockUid: `job-dispatch-${job.uid}`,
33947
33947
  operation: async () => await this.dispatchJob(command),
33948
33948
  });
33949
+ return result.result;
33949
33950
  }
33950
33951
  async dispatchJob(command) {
33951
33952
  const { input: { job, schedule, runType, payload }, } = command;