-
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathSyncMetrics.cs
More file actions
87 lines (72 loc) · 3.05 KB
/
Copy pathSyncMetrics.cs
File metadata and controls
87 lines (72 loc) · 3.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
#nullable disable warnings
using System;
using System.Collections.Generic;
using SIL.XForge.Models;
namespace SIL.XForge.Scripture.Models;
/// <summary>
/// Information on each sync performed.
/// </summary>
public record SyncMetrics : IIdentifiable
{
// Sync Details
public DateTime? DateFinished { get; set; }
public DateTime DateQueued { get; set; }
public DateTime? DateStarted { get; set; }
public string Id { get; set; }
public string ErrorDetails { get; set; }
public string RequiresId { get; set; }
public string ProductVersion { get; set; }
public string ProjectRef { get; set; }
public SyncStatus Status { get; set; }
public string UserRef { get; set; }
// Sync Statistics
/// <summary>
/// Gets or sets the info for changes to biblical terms incoming from Paratext.
/// </summary>
public SyncMetricInfo BiblicalTerms { get; set; } = new SyncMetricInfo();
/// <summary>
/// Gets or sets the info for changes to books incoming from Paratext.
/// </summary>
public SyncMetricInfo Books { get; set; } = new SyncMetricInfo();
/// <summary>
/// Gets or sets the info for changes to notes incoming from Paratext.
/// </summary>
public NoteSyncMetricInfo Notes { get; set; } = new NoteSyncMetricInfo();
/// <summary>
/// Gets or sets the info for changes to note threads incoming from Paratext.
/// </summary>
public SyncMetricInfo NoteThreads { get; set; } = new SyncMetricInfo();
/// <summary>
/// Gets or sets the info for changes to biblical terms outgoing to Paratext.
/// </summary>
public SyncMetricInfo ParatextBiblicalTerms { get; set; } = new SyncMetricInfo();
/// <summary>
/// Gets or sets the info for changes to books outgoing to Paratext.
/// </summary>
public SyncMetricInfo ParatextBooks { get; set; } = new SyncMetricInfo();
/// <summary>
/// Gets or sets the info for changes to notes outgoing to Paratext.
/// </summary>
public SyncMetricInfo ParatextNotes { get; set; } = new SyncMetricInfo();
/// <summary>
/// Gets or sets the info for changes to permissions outgoing to Paratext.
/// </summary>
public SyncMetricInfo ParatextPermissions { get; set; } = new SyncMetricInfo();
/// <summary>
/// Gets or sets the info for changes to questions incoming from Paratext.
/// </summary>
public SyncMetricInfo Questions { get; set; } = new SyncMetricInfo();
public bool RepositoryBackupCreated { get; set; }
public bool RepositoryRestoredFromBackup { get; set; }
public SyncMetricInfo ResourceUsers { get; set; } = new SyncMetricInfo();
public SyncMetricInfo TextDocs { get; set; } = new SyncMetricInfo();
public SyncMetricInfo Users { get; set; } = new SyncMetricInfo();
/// <summary>
/// The log messages from <see cref="Services.ParatextSyncRunner"/>.
/// </summary>
public List<string> Log { get; set; } = [];
/// <summary>
/// Any previous syncs from the same hangfire job.
/// </summary>
public List<SyncMetrics>? PreviousSyncs { get; set; }
}