feat(api, core, dal, domain): В таблицу Tasks добавлено поле процент выполнения, так же добавлено это поле в response - статус формирования отчета. Создан интерфейс для отслеживания прогресса IProgressAsync. Из сервиса WorkloadService исключен ITaskManagementService.
This commit is contained in:
3818
PARR.DAL/Migrations/20260519233448_tblTaskItemAddProgressPercent.Designer.cs
generated
Normal file
3818
PARR.DAL/Migrations/20260519233448_tblTaskItemAddProgressPercent.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,57 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace PARR.DAL.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class tblTaskItemAddProgressPercent : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "ProgressPercent",
|
||||
schema: "task",
|
||||
table: "Tasks",
|
||||
type: "integer",
|
||||
nullable: true,
|
||||
comment: "Процент выполнения задачи");
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "ParrComponents",
|
||||
columns: new[] { "Id", "Description", "Name" },
|
||||
values: new object[] { 14, "Генератор кэша отчетов workload", "WorkloadBuilder" });
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
schema: "task",
|
||||
table: "Types",
|
||||
keyColumn: "Code",
|
||||
keyValue: 0,
|
||||
column: "MaxExecutionTimeMinutes",
|
||||
value: 90);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DeleteData(
|
||||
table: "ParrComponents",
|
||||
keyColumn: "Id",
|
||||
keyValue: 14);
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ProgressPercent",
|
||||
schema: "task",
|
||||
table: "Tasks");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
schema: "task",
|
||||
table: "Types",
|
||||
keyColumn: "Code",
|
||||
keyValue: 0,
|
||||
column: "MaxExecutionTimeMinutes",
|
||||
value: 60);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -17,7 +17,7 @@ namespace PARR.DAL.Migrations
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "7.0.20")
|
||||
.HasAnnotation("ProductVersion", "9.0.16")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
||||
|
||||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
||||
@@ -754,6 +754,12 @@ namespace PARR.DAL.Migrations
|
||||
Id = 13,
|
||||
Description = "Генератор шаблонов",
|
||||
Name = "TemplateTaskGenerator"
|
||||
},
|
||||
new
|
||||
{
|
||||
Id = 14,
|
||||
Description = "Генератор кэша отчетов workload",
|
||||
Name = "WorkloadBuilder"
|
||||
});
|
||||
});
|
||||
|
||||
@@ -2406,6 +2412,10 @@ namespace PARR.DAL.Migrations
|
||||
b.Property<DateTimeOffset?>("ProcessedAt")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<int?>("ProgressPercent")
|
||||
.HasColumnType("integer")
|
||||
.HasComment("Процент выполнения задачи");
|
||||
|
||||
b.Property<int>("RetryCount")
|
||||
.HasColumnType("integer");
|
||||
|
||||
@@ -2512,7 +2522,7 @@ namespace PARR.DAL.Migrations
|
||||
Code = 0,
|
||||
Description = "Формирование данных для отчетности - Загруженность",
|
||||
IsSingleton = true,
|
||||
MaxExecutionTimeMinutes = 60,
|
||||
MaxExecutionTimeMinutes = 90,
|
||||
MaxRetries = 2,
|
||||
Name = "Workload",
|
||||
RetentionDays = 90
|
||||
|
||||
Reference in New Issue
Block a user