refactor(dotnet): standardize scheduler state and definitions
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
namespace QuantEngine.Web.Services;
|
||||
|
||||
public sealed record SchedulerJobDefinition(
|
||||
string JobId,
|
||||
string Cron,
|
||||
string Description,
|
||||
bool IsRecurring);
|
||||
|
||||
public sealed record SchedulerJobExecutionAudit(
|
||||
string JobId,
|
||||
string RunId,
|
||||
string State,
|
||||
string? Reason,
|
||||
DateTimeOffset StartedAt,
|
||||
DateTimeOffset? FinishedAt,
|
||||
string? ResourceKey);
|
||||
|
||||
public static class SchedulerStates
|
||||
{
|
||||
public const string Pending = "PENDING";
|
||||
public const string Running = "RUNNING";
|
||||
public const string Succeeded = "SUCCEEDED";
|
||||
public const string Failed = "FAILED";
|
||||
public const string Retrying = "RETRYING";
|
||||
public const string Blocked = "BLOCKED";
|
||||
}
|
||||
Reference in New Issue
Block a user