Browse Source

fix(distribute-lock): Disable DAPR_DISTRIBUTEDLOCK

pull/1416/head
colin 2 months ago
parent
commit
cda7be5a85
  1. 2
      aspnet-core/framework/dapr/LINGYUN.Abp.DistributedLocking.Dapr/LINGYUN/Abp/DistributedLocking/Dapr/DaprAbpDistributedLock.cs

2
aspnet-core/framework/dapr/LINGYUN.Abp.DistributedLocking.Dapr/LINGYUN/Abp/DistributedLocking/Dapr/DaprAbpDistributedLock.cs

@ -38,12 +38,14 @@ public class DaprAbpDistributedLock : IAbpDistributedLock, ITransientDependency
var client = DaprClientFactory.CreateClient();
var lockOwner = await LockOwnerFinder.FindAsync();
#pragma warning disable DAPR_DISTRIBUTEDLOCK
var res = await client.Lock(
Options.StoreName,
name,
lockOwner,
(int)timeout.TotalSeconds,
GetCancellationToken(cancellationToken));
#pragma warning restore DAPR_DISTRIBUTEDLOCK
if (res == null || !res.Success)
{

Loading…
Cancel
Save