mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 19:21:10 +00:00
Completes the scheduled jobs module with default jobs, a themed scheduler page and aligned recovery semantics
This commit is contained in:
1 parent
99a6159f7f
commit
4b7cfbbe11
67 files changed
+3324
-745
No files matched your search
+21
@@ -69,6 +69,27 @@ public class ScheduledJobEntityFixture
|
||||
UpdatedBy = null
|
||||
};
|
||||
}
|
||||
if (resolvedScheduleType == ScheduleType.OnceAtStartup)
|
||||
{
|
||||
return new ScheduledJobEntity
|
||||
{
|
||||
Id = id ?? Guid.NewGuid(),
|
||||
Name = name ?? f.Commerce.ProductName(),
|
||||
TaskType = taskType ?? f.PickRandom<ScheduledTaskType>(),
|
||||
ScheduleType = resolvedScheduleType,
|
||||
IntervalMinutes = null,
|
||||
Hour = null,
|
||||
Minute = null,
|
||||
Status = status ?? f.PickRandom<ScheduledJobStatus>(),
|
||||
OwnerUserId = ownerUserId ?? Guid.NewGuid(),
|
||||
LastStartedOnUtc = lastStartedOnUtc,
|
||||
LastCompletedOnUtc = lastCompletedOnUtc,
|
||||
CreatedOnUtc = DateTime.UtcNow,
|
||||
CreatedBy = Guid.NewGuid(),
|
||||
UpdatedOnUtc = null,
|
||||
UpdatedBy = null
|
||||
};
|
||||
}
|
||||
return new ScheduledJobEntity
|
||||
{
|
||||
Id = id ?? Guid.NewGuid(),
|
||||
|
||||
+3
@@ -23,6 +23,7 @@ public class ScheduledJobExecutionEntityFixture
|
||||
/// <param name="scheduledJobId">Optional. The Id of the scheduled job whose task was executed.</param>
|
||||
/// <param name="taskType">Optional. The type of the task that was executed.</param>
|
||||
/// <param name="isCycleRun">Optional. Whether the execution was a cycle run.</param>
|
||||
/// <param name="wasCycleActive">Optional. Whether the execution cycle of the scheduled job was active when the execution started.</param>
|
||||
/// <param name="startedOnUtc">Optional. The start time of the execution.</param>
|
||||
/// <param name="completedOnUtc">Optional. The completion time of the execution.</param>
|
||||
/// <returns>The created <see cref="ScheduledJobExecutionEntity"/>.</returns>
|
||||
@@ -31,6 +32,7 @@ public class ScheduledJobExecutionEntityFixture
|
||||
Guid? scheduledJobId = null,
|
||||
ScheduledTaskType? taskType = null,
|
||||
bool? isCycleRun = null,
|
||||
bool? wasCycleActive = null,
|
||||
DateTime? startedOnUtc = null,
|
||||
DateTime? completedOnUtc = null)
|
||||
{
|
||||
@@ -41,6 +43,7 @@ public class ScheduledJobExecutionEntityFixture
|
||||
ScheduledJobId = scheduledJobId ?? Guid.NewGuid(),
|
||||
TaskType = taskType ?? f.PickRandom<ScheduledTaskType>(),
|
||||
IsCycleRun = isCycleRun ?? f.Random.Bool(),
|
||||
WasCycleActive = wasCycleActive ?? f.Random.Bool(),
|
||||
StartedOnUtc = startedOnUtc ?? DateTime.UtcNow,
|
||||
CompletedOnUtc = completedOnUtc,
|
||||
CreatedOnUtc = DateTime.UtcNow,
|
||||
|
||||
Reference in new issue
Block a user