internal static HistoryRecord CreateHistory(WorkingRecord working, HistoryStatus status)
{
return new HistoryRecord()
{
ApplicationName = working.ApplicationName,
Data = working.Data,
FinishedOn = DateTime.UtcNow,
JobName = working.JobName,
JobType = working.JobType,
QueuedOn = working.QueuedOn,
QueueName = working.QueueName,
ScheduleId = working.ScheduleId,
StartedOn = working.StartedOn,
Status = status,
TryNumber = working.TryNumber,
WorkerId = working.WorkerId
};
}