Files
Umbraco-CMS/src/Umbraco.Infrastructure/Models/DistributedBackgroundJobModel.cs
Mole 981c9a7db2 Load balancing backoffice: Add missing id to distributed jobs when updating (#20642)
* 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>
2025-10-27 08:49:25 +01:00

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; }
}