Skip to content

Commit e4584d7

Browse files
committed
Remove unnecessary locks
1 parent 6d1366a commit e4584d7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

internal-packages/run-engine/src/engine/locking.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ export class RunLocker {
337337
const signal = controller.signal as redlock.RedlockAbortSignal;
338338

339339
const manualContext: ManualLockContext = {
340-
lock: lock!,
340+
lock,
341341
timeout: undefined,
342342
extension: undefined,
343343
};
@@ -390,12 +390,12 @@ export class RunLocker {
390390
this.#cleanupExtension(manualContext);
391391

392392
// Release the lock using tryCatch
393-
const [releaseError] = await tryCatch(lock!.release());
393+
const [releaseError] = await tryCatch(lock.release());
394394
if (releaseError) {
395395
this.logger.warn("[RunLocker] Error releasing lock", {
396396
error: releaseError,
397397
resources: sortedResources,
398-
lockValue: lock!.value,
398+
lockValue: lock.value,
399399
});
400400
}
401401
}

0 commit comments

Comments
 (0)