* Add ID when updating background job * Reduce default period to 5 seconds * Apply suggestions from code review Co-authored-by: Andy Butland <abutland73@gmail.com> --------- Co-authored-by: Andy Butland <abutland73@gmail.com>
38 lines
812 B
C#
38 lines
812 B
C#
namespace Umbraco.Cms.Infrastructure.Models;
|
|
|
|
/// <summary>
|
|
/// Model for distributed background jobs.
|
|
/// </summary>
|
|
public class DistributedBackgroundJobModel
|
|
{
|
|
/// <summary>
|
|
/// The id of the job.
|
|
/// </summary>
|
|
public int Id { get; set; }
|
|
|
|
/// <summary>
|
|
/// Name of job.
|
|
/// </summary>
|
|
public required string Name { get; init; }
|
|
|
|
/// <summary>
|
|
/// Period of job.
|
|
/// </summary>
|
|
public TimeSpan Period { get; set; }
|
|
|
|
/// <summary>
|
|
/// Time of last run.
|
|
/// </summary>
|
|
public DateTime LastRun { get; set; }
|
|
|
|
/// <summary>
|
|
/// If the job is running.
|
|
/// </summary>
|
|
public bool IsRunning { get; set; }
|
|
|
|
/// <summary>
|
|
/// Time of last attempted run.
|
|
/// </summary>
|
|
public DateTime LastAttemptedRun { get; set; }
|
|
}
|