Skip to content

Commit

Permalink
refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasmnxavierrj committed Jul 8, 2024
1 parent a0a8ccd commit c692d26
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions HangfireServiceTemplate.sln
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.31903.59
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HF.Service", "src\HF.Service\HF.Service.csproj", "{4F31C98E-E727-4B57-8E07-6052585B4C45}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HF.Server", "src\HF.Service\HF.Server.csproj", "{4F31C98E-E727-4B57-8E07-6052585B4C45}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HF.Api", "src\HF.Api\HF.Api.csproj", "{0D1BAE61-EE78-4AAE-8D93-D84709C273B5}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HF.Api", "src\HF.Api\HF.Api.csproj", "{0D1BAE61-EE78-4AAE-8D93-D84709C273B5}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HF.Jobs", "src\HF.Jobs\HF.Jobs.csproj", "{4A33ADA7-B41D-4628-8620-607A392D36CB}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HF.Jobs", "src\HF.Jobs\HF.Jobs.csproj", "{4A33ADA7-B41D-4628-8620-607A392D36CB}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
6 changes: 4 additions & 2 deletions src/HF.Api/EndpointsMapping.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@ public static WebApplication MapEndpoints(this WebApplication app)
{
try
{
var queueNumber = job.Enqueue<ImmediateJobExample>(x => x.StartAsync(cancellationToken));
var queueNumber = job.Enqueue<ImmediateJobExample>(x => x.ExecuteProcessAsync(cancellationToken));

return Results.Ok(new { Message = "Job triggered successfully", QueueNumber = queueNumber });
return Results.Ok(new {
Message = "Job triggered successfully",
QueueNumber = queueNumber });
}
catch (Exception ex)
{
Expand Down
4 changes: 1 addition & 3 deletions src/HF.Api/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@
{
var connectionString = builder.Configuration.GetConnectionString("Default");

config.UseSqlServerStorage(connectionString, new SqlServerStorageOptions
{
});
config.UseSqlServerStorage(connectionString);
});

builder.Services.AddEndpointsApiExplorer();
Expand Down
File renamed without changes.

0 comments on commit c692d26

Please sign in to comment.