Set command timeout to lock timeout if higher tan default of 30s
This commit is contained in:
parent
55c77454eb
commit
b05861a2c0
|
|
@ -47,6 +47,7 @@ namespace Elsa
|
|||
command.Parameters.AddWithValue("@LockOwner", $"Session");
|
||||
command.Parameters.AddWithValue("@LockMode", $"Exclusive");
|
||||
command.Parameters.AddWithValue("@LockTimeout", timeoutMils);
|
||||
command.CommandTimeout = Math.Max((int?)timeout?.TotalSeconds ?? 30, 30);
|
||||
|
||||
var returnParameter = command.Parameters.Add("RetVal", SqlDbType.Int);
|
||||
returnParameter.Direction = ParameterDirection.ReturnValue;
|
||||
|
|
|
|||
Loading…
Reference in a new issue