Increase HttpClient timeout for long-running operations
All checks were successful
Build & Deploy Leave Service / build (push) Successful in 1m21s
All checks were successful
Build & Deploy Leave Service / build (push) Successful in 1m21s
This commit is contained in:
parent
06b53ddeaa
commit
5c05f1123a
2 changed files with 259 additions and 246 deletions
|
|
@ -96,7 +96,11 @@ builder.Services.AddPersistence(builder.Configuration);
|
|||
builder.Services.AddLeavePersistence(builder.Configuration);
|
||||
builder.Services.AddTransient<HolidayService>();
|
||||
|
||||
builder.Services.AddHttpClient();
|
||||
// Configure HttpClient with increased timeout for long-running operations (e.g., RabbitMQ Management API)
|
||||
builder.Services.AddHttpClient<HttpClient>(client =>
|
||||
{
|
||||
client.Timeout = TimeSpan.FromMinutes(10); // Set timeout to 10 minutes
|
||||
});
|
||||
|
||||
builder.Services.AddControllers(options =>
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue