* Implement distributed lock for registry population Added distributed lock in 'PopulateRegistriesHostedService' to prevent concurrent registry updates. Also implemented a semaphore in 'DefaultWorkflowDefinitionStorePopulator' to control access to shared resources during add or update operations. This change helps to ensure the integrity and consistency of the workflow registries. * Refactor dependency injection for IDistributedLockProvider * Refactor option classes to parameter classes in workflow runtime This refactoring enhances the clarity of the Elsa Workflow runtime by renaming "options" classes to "parameters" classes. The name "options" misrepresented the classes' role and created confusion, as they are used to parameterize method calls rather than to configure services. The change applies to various workflow methods and tests across the project.
16 lines
540 B
C#
16 lines
540 B
C#
using Elsa.Workflows.Runtime.Services;
|
|
using JetBrains.Annotations;
|
|
|
|
namespace Elsa.Workflows.Runtime.Options;
|
|
|
|
/// <summary>
|
|
/// Provides options related to distributed locking, which is used by <see cref="DefaultWorkflowRuntime"/>.
|
|
/// </summary>
|
|
[UsedImplicitly]
|
|
public class DistributedLockingOptions
|
|
{
|
|
/// <summary>
|
|
/// The maximum amount of time to wait before giving up trying to acquire a lock. Defaults to 10 minutes.
|
|
/// </summary>
|
|
public TimeSpan LockAcquisitionTimeout { get; set; } = TimeSpan.FromMinutes(10);
|
|
} |