Skip to content

Commit

Permalink
Hangfire configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
Варнавский Владимир Николаевич committed Oct 31, 2023
1 parent 3b881cb commit 756c531
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Web.Api/Controllers/PreachyBudgetController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public async Task<IActionResult> AmoHookHandle()
return Ok();
}

[HttpPost("AmoHookHandle/private")]
[ApiExplorerSettings(IgnoreApi = true)]
public async Task<IActionResult> AmoHookHandle(string request)
{
var hook = ParseHook(request);
Expand Down
4 changes: 4 additions & 0 deletions Web.Api/Program.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
using Hangfire;
using Hangfire.MemoryStorage;

var builder = WebApplication.CreateBuilder(args);

var port = Environment.GetEnvironmentVariable("PORT");
Expand All @@ -10,6 +13,7 @@
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();
builder.Services.AddHangfire(c => c.UseMemoryStorage());

var app = builder.Build();

Expand Down
1 change: 1 addition & 0 deletions Web.Api/Web.Api.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
<PackageReference Include="AspNetCore.Yandex.ObjectStorage" Version="0.2.2" />
<PackageReference Include="Google.Apis.Sheets.v4" Version="1.60.0.2979" />
<PackageReference Include="Hangfire" Version="1.8.6" />
<PackageReference Include="Hangfire.MemoryStorage" Version="1.8.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.2.3" />
</ItemGroup>
Expand Down

0 comments on commit 756c531

Please sign in to comment.