feat(runtime): per-script execution timeout overriding the global default (#9)
Spec promised a per-script timeout but only the global ScriptExecutionTimeoutSeconds existed. Add nullable TemplateScript.ExecutionTimeoutSeconds threaded through EF + flattening (ResolvedScript) to ScriptExecutionActor/AlarmExecutionActor, which use perScript ?? global for the execution CTS. Includes the EF migration for the new column.
This commit is contained in:
@@ -83,7 +83,10 @@ public class RevisionHashService
|
||||
TriggerConfiguration = s.TriggerConfiguration,
|
||||
ParameterDefinitions = s.ParameterDefinitions,
|
||||
ReturnDefinition = s.ReturnDefinition,
|
||||
MinTimeBetweenRunsTicks = s.MinTimeBetweenRuns?.Ticks
|
||||
MinTimeBetweenRunsTicks = s.MinTimeBetweenRuns?.Ticks,
|
||||
// M2.5 (#9): include the per-script timeout so a change to it
|
||||
// is detected as a configuration change (staleness/redeploy).
|
||||
ExecutionTimeoutSeconds = s.ExecutionTimeoutSeconds
|
||||
})
|
||||
.ToList(),
|
||||
Connections = configuration.Connections is { Count: > 0 }
|
||||
@@ -244,6 +247,10 @@ public class RevisionHashService
|
||||
/// </summary>
|
||||
public string Code { get; init; } = string.Empty;
|
||||
/// <summary>
|
||||
/// M2.5 (#9): the per-script execution timeout in seconds (null = global).
|
||||
/// </summary>
|
||||
public int? ExecutionTimeoutSeconds { get; init; }
|
||||
/// <summary>
|
||||
/// Whether the script is locked.
|
||||
/// </summary>
|
||||
public bool IsLocked { get; init; }
|
||||
|
||||
Reference in New Issue
Block a user