-
Notifications
You must be signed in to change notification settings - Fork 170
Open
Description
Is there a way to only verify if a lock is present (i.e. the protected process is running)?
I want to do if (redLock.IsAcquired) but without actually trying to acquire a lock.
Something like this code maybe:
var lockExists = await redlockFactory.CheckForExistingLockAsync(resource);
My use case is that I have a background process that runs a long-running operation and a foreground process that enqueues process requests in RabbitMQ. If the process is already running, I would enqueue another request that I know if going to be refused.
Thanks.
Metadata
Metadata
Assignees
Labels
No labels