after refactor cleanup
This commit is contained in:
40
DiunaBI.Domain/Entities/QueueJob.cs
Normal file
40
DiunaBI.Domain/Entities/QueueJob.cs
Normal file
@@ -0,0 +1,40 @@
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace DiunaBI.Domain.Entities;
|
||||
|
||||
public class QueueJob
|
||||
{
|
||||
public Guid Id { get; set; } = Guid.NewGuid();
|
||||
public Guid LayerId { get; set; }
|
||||
public string LayerName { get; set; } = string.Empty;
|
||||
public string PluginName { get; set; } = string.Empty;
|
||||
public JobType JobType { get; set; }
|
||||
public int Priority { get; set; } = 0; // 0 = highest priority
|
||||
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
|
||||
public int RetryCount { get; set; } = 0;
|
||||
public int MaxRetries { get; set; } = 5;
|
||||
public JobStatus Status { get; set; } = JobStatus.Pending;
|
||||
public string? LastError { get; set; }
|
||||
public DateTime? LastAttemptAt { get; set; }
|
||||
public DateTime? CompletedAt { get; set; }
|
||||
public Guid CreatedById { get; set; }
|
||||
public DateTime CreatedAtUtc { get; set; } = DateTime.UtcNow;
|
||||
public Guid ModifiedById { get; set; }
|
||||
public DateTime ModifiedAtUtc { get; set; } = DateTime.UtcNow;
|
||||
}
|
||||
|
||||
public enum JobType
|
||||
{
|
||||
Import = 0,
|
||||
Process = 1
|
||||
}
|
||||
|
||||
public enum JobStatus
|
||||
{
|
||||
Pending,
|
||||
Running,
|
||||
Completed,
|
||||
Failed,
|
||||
Retrying
|
||||
}
|
||||
Reference in New Issue
Block a user