Current Behavior
We currently have a "manual trigger" button in the CSAF advisory UI that triggers the execution of the CSAF vuln data source plugin. That works quite well, by creating an "event" and let the event system handle it. However, since there is a lockout (which makes sense), this event is sometimes not doing nothing at all. If I would have information about the current lock I could use that to inform the UI that the task is still locked and maybe disable the trigger button until then.
Proposed Behavior
It would be nice to be able to retrieve the information, if the lock on the particular data source is still active. I can access the LockProvider and the LockingTaskExecutor, but the this only allows me to add a new lock, which I don't want because I would then lock the task, and this should be done by the event system.
It seems to be that this information is somehow available deep within the LockRecordRegistry of the StorageBasedLockProvider, but the public interface of the StorageBasedLockProvider only allows new locks, but no checking of existing ones.
Checklist
Current Behavior
We currently have a "manual trigger" button in the CSAF advisory UI that triggers the execution of the CSAF vuln data source plugin. That works quite well, by creating an "event" and let the event system handle it. However, since there is a lockout (which makes sense), this event is sometimes not doing nothing at all. If I would have information about the current lock I could use that to inform the UI that the task is still locked and maybe disable the trigger button until then.
Proposed Behavior
It would be nice to be able to retrieve the information, if the lock on the particular data source is still active. I can access the
LockProviderand theLockingTaskExecutor, but the this only allows me to add a new lock, which I don't want because I would then lock the task, and this should be done by the event system.It seems to be that this information is somehow available deep within the
LockRecordRegistryof theStorageBasedLockProvider, but the public interface of theStorageBasedLockProvideronly allows new locks, but no checking of existing ones.Checklist