(address: string, shardId: string, now: number)
| 900 | ) |
| 901 | |
| 902 | const createLock = (address: string, shardId: string, now: number) => |
| 903 | Effect |
| 904 | .tryPromise(() => |
| 905 | container.items.create<LockDoc>({ |
| 906 | id: lockDocId(shardId), |
| 907 | _partitionKey: "lock", |
| 908 | type: "lock", |
| 909 | shardId, |
| 910 | address, |
| 911 | acquiredAt: now |
| 912 | }) |
| 913 | ) |
| 914 | .pipe( |
| 915 | Effect.tap(annotateItem), |
| 916 | Effect.as(true), |
| 917 | Effect.catchIf(isConflict, () => Effect.succeed(false)) |
| 918 | ) |
| 919 | |
| 920 | const tryAcquire = (address: string, shardId: string, now: number) => |
| 921 | readLock(shardId).pipe( |
no test coverage detected
searching dependent graphs…