Skip to content

Челаев Петр Лаб. 1 Группа 6512#14

Open
PripyatskyPrometheus wants to merge 11 commits intoitsecd:mainfrom
PripyatskyPrometheus:main
Open

Челаев Петр Лаб. 1 Группа 6512#14
PripyatskyPrometheus wants to merge 11 commits intoitsecd:mainfrom
PripyatskyPrometheus:main

Conversation

@PripyatskyPrometheus
Copy link

ФИО: Челаев Петр
Номер группы: 6512
Номер лабораторной: 1
Номер варианта: 35
Краткое описание предметной области: Программный проект
Краткое описание добавленных фич: Добавлен сервис генерации и кэширование

@github-actions github-actions bot added In progress Код в процессе проверки Lab 1 Лабораторная №1. Кэширование labels Feb 23, 2026
@alxmcs alxmcs closed this Feb 24, 2026
@alxmcs alxmcs reopened this Feb 24, 2026
@github-actions github-actions bot requested a review from Gwymlas February 24, 2026 07:52
@@ -0,0 +1,15 @@
var builder = DistributedApplication.CreateBuilder(args);

var cache = builder.AddRedis("cache");
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

К редису добавить контейнер с вебмордой

.WithReference(cache)
.WaitFor(cache);

// ������� �������
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Проблемы с кодировкой

// ������� �������
var client = builder.AddProject<Projects.Client_Wasm>("client-wasm")
.WithExternalHttpEndpoints()
.WithReference(generationService);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Точно надо .WithReference(generationService)?
Я бы добавил .WaitFor(generationService)

Comment on lines 20 to 21
<PackageReference Include="Aspire.Hosting.AppHost" Version="13.1.1" />
<PackageReference Include="Aspire.Hosting.Redis" Version="13.1.1" />
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Разные версии Aspire Sdk и пакетов

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Извините, вот этого замечания не понял? Какие пакеты версии разные? Наоборот они вроде одни и те же

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Выше в этом файле
<Sdk Name="Aspire.AppHost.Sdk" Version="9.3.1" />

Давай остановимся на версии 9.5.2

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Исправил

<ItemGroup>
<ProjectReference Include="..\Client.Wasm\Client.Wasm.csproj" />
<ProjectReference Include="..\ProgramProject.GenerationService\ProgramProject.GenerationService.csproj" />
<ProjectReference Include="..\ProgramProject.ServiceDefaults\ProgramProject.ServiceDefaults.csproj" />
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ненужная ссылка на проект

Comment on lines 26 to 27
var uri = new Uri(origin);
return uri.Host == "localhost";
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Думаю лучше обернуть в try-catch

var uri = new Uri(origin);
return uri.Host == "localhost";
})
.AllowAnyMethod()
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Можно разрешить только GET запросы

Comment on lines 19 to 25
f.PickRandom(new[]
{
f.Commerce.ProductName() + " " + f.Hacker.Abbreviation(),
"Project " + f.Hacker.Noun(),
f.Finance.AccountName() + " System",
f.Lorem.Word() + "-" + f.Lorem.Word()
}))
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

f.PickRandom(
    f.Commerce.ProductName() + " " + f.Hacker.Abbreviation(), 
    "Project " + f.Hacker.Noun(), 
    f.Finance.AccountName() + " System", 
    f.Lorem.Word() + "-" + f.Lorem.Word()
))

Comment on lines 15 to 18
/// <summary>
/// Название проекта: комбинация из Commerce, Hacker, Finance, Lorem
/// </summary>
.RuleFor(p => p.Name, f =>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Тут и в других местах используй по необходимости однострочные комментарии (//) для пояснения логики кода
XML-комментарии используй для документирования классов и методов, а не внутренней реализации

Comment on lines 87 to 93
.FinishWith((f, p) =>
{
if (p.ActualEndDate.HasValue)
{
p.CompletionPercentage = 100;
}
});
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Этот код не избыточен?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

In progress Код в процессе проверки Lab 1 Лабораторная №1. Кэширование

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants