-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
stasput
committed
Nov 15, 2024
1 parent
1a1fa22
commit 2b5bc58
Showing
40 changed files
with
1,234 additions
and
1,355 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
wsl -u root sh -c "service docker status || (service docker start && echo 'artificially waiting 20s for docker to warmup...' && sleep 20s)" | ||
wsl docker-compose -f docker-compose.linux.yaml up -d --build | ||
wsl docker-compose -f docker-compose.yaml up -d --build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 23 additions & 28 deletions
51
Cassandra.DistributedTaskQueue.Monitoring/Api/RtqMonitoringSearchRequest.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,28 @@ | ||
using JetBrains.Annotations; | ||
|
||
using Newtonsoft.Json; | ||
using System.Text.Json.Serialization; | ||
|
||
using SkbKontur.Cassandra.DistributedTaskQueue.Cassandra.Entities; | ||
|
||
namespace SkbKontur.Cassandra.DistributedTaskQueue.Monitoring.Api | ||
namespace SkbKontur.Cassandra.DistributedTaskQueue.Monitoring.Api; | ||
|
||
public class RtqMonitoringSearchRequest | ||
{ | ||
public class RtqMonitoringSearchRequest | ||
{ | ||
[NotNull] | ||
[JsonProperty("enqueueTimestampRange")] | ||
public TimestampRange EnqueueTimestampRange { get; set; } | ||
|
||
[CanBeNull] | ||
[JsonProperty("queryString")] | ||
public string QueryString { get; set; } | ||
|
||
[CanBeNull] | ||
[JsonProperty("states")] | ||
public TaskState[] States { get; set; } | ||
|
||
[CanBeNull, ItemNotNull] | ||
[JsonProperty("names")] | ||
public string[] Names { get; set; } | ||
|
||
[JsonProperty("offset")] | ||
public int? Offset { get; set; } | ||
|
||
[JsonProperty("count")] | ||
public int? Count { get; set; } | ||
} | ||
[JsonPropertyName("enqueueTimestampRange")] | ||
public TimestampRange EnqueueTimestampRange { get; set; } | ||
|
||
#nullable enable | ||
[JsonPropertyName("queryString")] | ||
public string? QueryString { get; set; } | ||
|
||
[JsonPropertyName("states")] | ||
public TaskState[]? States { get; set; } | ||
|
||
#nullable disable | ||
[JsonPropertyName("names")] | ||
public string[] Names { get; set; } | ||
|
||
[JsonPropertyName("offset")] | ||
public int? Offset { get; set; } | ||
|
||
[JsonPropertyName("count")] | ||
public int? Count { get; set; } | ||
} |
19 changes: 8 additions & 11 deletions
19
Cassandra.DistributedTaskQueue.Monitoring/Api/RtqMonitoringSearchResults.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,13 @@ | ||
using JetBrains.Annotations; | ||
using System.Text.Json.Serialization; | ||
|
||
using Newtonsoft.Json; | ||
namespace SkbKontur.Cassandra.DistributedTaskQueue.Monitoring.Api; | ||
|
||
namespace SkbKontur.Cassandra.DistributedTaskQueue.Monitoring.Api | ||
public class RtqMonitoringSearchResults | ||
{ | ||
public class RtqMonitoringSearchResults | ||
{ | ||
[JsonProperty("totalCount")] | ||
public long TotalCount { get; set; } | ||
[JsonPropertyName("totalCount")] | ||
public long TotalCount { get; set; } | ||
|
||
[NotNull, ItemNotNull] | ||
[JsonProperty("taskMetas")] | ||
public RtqMonitoringTaskMeta[] TaskMetas { get; set; } | ||
} | ||
#nullable disable | ||
[JsonPropertyName("taskMetas")] | ||
public RtqMonitoringTaskMeta[] TaskMetas { get; set; } | ||
} |
115 changes: 55 additions & 60 deletions
115
Cassandra.DistributedTaskQueue.Monitoring/Api/RtqMonitoringTaskMeta.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,67 +1,62 @@ | ||
using JetBrains.Annotations; | ||
#nullable disable | ||
|
||
using Newtonsoft.Json; | ||
using Newtonsoft.Json.Converters; | ||
using System.Text.Json.Serialization; | ||
|
||
using SkbKontur.Cassandra.DistributedTaskQueue.Cassandra.Entities; | ||
using SkbKontur.Cassandra.DistributedTaskQueue.Monitoring.Json; | ||
|
||
namespace SkbKontur.Cassandra.DistributedTaskQueue.Monitoring.Api | ||
namespace SkbKontur.Cassandra.DistributedTaskQueue.Monitoring.Api; | ||
|
||
public class RtqMonitoringTaskMeta | ||
{ | ||
public class RtqMonitoringTaskMeta | ||
{ | ||
[NotNull] | ||
[JsonProperty("name")] | ||
public string Name { get; set; } | ||
|
||
[NotNull] | ||
[JsonProperty("id")] | ||
public string Id { get; set; } | ||
|
||
[JsonProperty("ticks")] | ||
[JsonConverter(typeof(LongToStringConverter))] | ||
public long Ticks { get; set; } | ||
|
||
[JsonProperty("minimalStartTicks")] | ||
[JsonConverter(typeof(LongToStringConverter))] | ||
public long MinimalStartTicks { get; set; } | ||
|
||
[JsonProperty("startExecutingTicks")] | ||
[JsonConverter(typeof(LongToStringConverter))] | ||
public long? StartExecutingTicks { get; set; } | ||
|
||
[JsonProperty("finishExecutingTicks")] | ||
[JsonConverter(typeof(LongToStringConverter))] | ||
public long? FinishExecutingTicks { get; set; } | ||
|
||
[JsonProperty("lastModificationTicks")] | ||
[JsonConverter(typeof(LongToStringConverter))] | ||
public long? LastModificationTicks { get; set; } | ||
|
||
[JsonProperty("expirationTimestampTicks")] | ||
[JsonConverter(typeof(LongToStringConverter))] | ||
public long? ExpirationTimestampTicks { get; set; } | ||
|
||
[JsonProperty("expirationModificationTicks")] | ||
[JsonConverter(typeof(LongToStringConverter))] | ||
public long? ExpirationModificationTicks { get; set; } | ||
|
||
[JsonProperty("executionDurationTicks")] | ||
[JsonConverter(typeof(LongToStringConverter))] | ||
public long? ExecutionDurationTicks { get; set; } | ||
|
||
[JsonProperty("state")] | ||
[JsonConverter(typeof(StringEnumConverter))] | ||
public TaskState State { get; set; } | ||
|
||
[CanBeNull] | ||
[JsonProperty("taskActions")] | ||
public TaskActions TaskActions { get; set; } | ||
|
||
[JsonProperty("attempts")] | ||
public int Attempts { get; set; } | ||
|
||
[JsonProperty("parentTaskId")] | ||
public string ParentTaskId { get; set; } | ||
} | ||
[JsonPropertyName("name")] | ||
public string Name { get; set; } | ||
|
||
[JsonPropertyName("id")] | ||
public string Id { get; set; } | ||
|
||
[JsonPropertyName("ticks")] | ||
[JsonConverter(typeof(LongToStringConverter))] | ||
public long Ticks { get; set; } | ||
|
||
[JsonPropertyName("minimalStartTicks")] | ||
[JsonConverter(typeof(LongToStringConverter))] | ||
public long MinimalStartTicks { get; set; } | ||
|
||
[JsonPropertyName("startExecutingTicks")] | ||
[JsonConverter(typeof(LongToStringConverter))] | ||
public long? StartExecutingTicks { get; set; } | ||
|
||
[JsonPropertyName("finishExecutingTicks")] | ||
[JsonConverter(typeof(LongToStringConverter))] | ||
public long? FinishExecutingTicks { get; set; } | ||
|
||
[JsonPropertyName("lastModificationTicks")] | ||
[JsonConverter(typeof(LongToStringConverter))] | ||
public long? LastModificationTicks { get; set; } | ||
|
||
[JsonPropertyName("expirationTimestampTicks")] | ||
[JsonConverter(typeof(LongToStringConverter))] | ||
public long? ExpirationTimestampTicks { get; set; } | ||
|
||
[JsonPropertyName("expirationModificationTicks")] | ||
[JsonConverter(typeof(LongToStringConverter))] | ||
public long? ExpirationModificationTicks { get; set; } | ||
|
||
[JsonPropertyName("executionDurationTicks")] | ||
[JsonConverter(typeof(LongToStringConverter))] | ||
public long? ExecutionDurationTicks { get; set; } | ||
|
||
[JsonPropertyName("state")] | ||
[JsonConverter(typeof(JsonStringEnumConverter))] | ||
public TaskState State { get; set; } | ||
|
||
[JsonPropertyName("taskActions")] | ||
public TaskActions TaskActions { get; set; } | ||
|
||
[JsonPropertyName("attempts")] | ||
public int Attempts { get; set; } | ||
|
||
[JsonPropertyName("parentTaskId")] | ||
public string ParentTaskId { get; set; } | ||
} |
43 changes: 19 additions & 24 deletions
43
Cassandra.DistributedTaskQueue.Monitoring/Api/RtqMonitoringTaskModel.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,26 @@ | ||
using JetBrains.Annotations; | ||
#nullable disable | ||
|
||
using Newtonsoft.Json; | ||
using System.Text.Json.Serialization; | ||
|
||
using SkbKontur.Cassandra.DistributedTaskQueue.Handling; | ||
using SkbKontur.Cassandra.DistributedTaskQueue.Monitoring.Json; | ||
|
||
namespace SkbKontur.Cassandra.DistributedTaskQueue.Monitoring.Api | ||
namespace SkbKontur.Cassandra.DistributedTaskQueue.Monitoring.Api; | ||
|
||
public class RtqMonitoringTaskModel | ||
{ | ||
public class RtqMonitoringTaskModel | ||
{ | ||
public static RtqMonitoringTaskModel Empty => new RtqMonitoringTaskModel(); | ||
|
||
[NotNull] | ||
[JsonProperty("taskMeta")] | ||
public RtqMonitoringTaskMeta TaskMeta { get; set; } | ||
|
||
[NotNull] | ||
[JsonProperty("taskData")] | ||
[JsonConverter(typeof(TaskDataJsonSerializer))] | ||
public IRtqTaskData TaskData { get; set; } | ||
|
||
[NotNull, ItemNotNull] | ||
[JsonProperty("childTaskIds")] | ||
public string[] ChildTaskIds { get; set; } | ||
|
||
[NotNull, ItemNotNull] | ||
[JsonProperty("exceptionInfos")] | ||
public string[] ExceptionInfos { get; set; } | ||
} | ||
public static RtqMonitoringTaskModel Empty => new(); | ||
|
||
[JsonPropertyName("taskMeta")] | ||
public RtqMonitoringTaskMeta TaskMeta { get; set; } | ||
|
||
[JsonPropertyName("taskData")] | ||
[JsonConverter(typeof(TaskDataJsonSerializer))] | ||
public IRtqTaskData TaskData { get; set; } | ||
|
||
[JsonPropertyName("childTaskIds")] | ||
public string[] ChildTaskIds { get; set; } | ||
|
||
[JsonPropertyName("exceptionInfos")] | ||
public string[] ExceptionInfos { get; set; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
using Newtonsoft.Json; | ||
using System.Text.Json.Serialization; | ||
|
||
namespace SkbKontur.Cassandra.DistributedTaskQueue.Monitoring.Api; | ||
|
||
public class TaskActions | ||
{ | ||
[JsonProperty("canCancel")] | ||
[JsonPropertyName("canCancel")] | ||
public bool CanCancel { get; set; } | ||
|
||
[JsonProperty("canRerun")] | ||
[JsonPropertyName("canRerun")] | ||
public bool CanRerun { get; set; } | ||
} |
25 changes: 11 additions & 14 deletions
25
Cassandra.DistributedTaskQueue.Monitoring/Api/TimestampRange.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,19 @@ | ||
using JetBrains.Annotations; | ||
#nullable disable | ||
|
||
using Newtonsoft.Json; | ||
using System.Text.Json.Serialization; | ||
|
||
using SkbKontur.Cassandra.DistributedTaskQueue.Monitoring.Json; | ||
using SkbKontur.Cassandra.TimeBasedUuid; | ||
|
||
namespace SkbKontur.Cassandra.DistributedTaskQueue.Monitoring.Api | ||
namespace SkbKontur.Cassandra.DistributedTaskQueue.Monitoring.Api; | ||
|
||
public class TimestampRange | ||
{ | ||
public class TimestampRange | ||
{ | ||
[NotNull] | ||
[JsonProperty("lowerBound")] | ||
[JsonConverter(typeof(TimestampJsonConverter))] | ||
public Timestamp LowerBound { get; set; } | ||
[JsonPropertyName("lowerBound")] | ||
[JsonConverter(typeof(TimestampJsonConverter))] | ||
public Timestamp LowerBound { get; set; } | ||
|
||
[NotNull] | ||
[JsonProperty("upperBound")] | ||
[JsonConverter(typeof(TimestampJsonConverter))] | ||
public Timestamp UpperBound { get; set; } | ||
} | ||
[JsonPropertyName("upperBound")] | ||
[JsonConverter(typeof(TimestampJsonConverter))] | ||
public Timestamp UpperBound { get; set; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.