Skip to content

Commit

Permalink
Register extension startup hooks only once (#2816)
Browse files Browse the repository at this point in the history
* Register extension startup hooks only once

* Minor comment update
  • Loading branch information
jviau authored Oct 30, 2024
1 parent 76f0ea7 commit 5cb04e7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/DotNetWorker.Core/Hosting/ServiceCollectionExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,11 @@ public static IFunctionsWorkerApplicationBuilder AddFunctionsWorkerCore(this ISe
{
builder = new FunctionsWorkerApplicationBuilder(services);
services.AddSingleton<IFunctionsWorkerApplicationBuilder>(builder);
}

// Execute startup code from worker extensions if present.
RunExtensionStartupCode(builder);
// Execute startup code from worker extensions if present
// Only run this once when builder is first added.
RunExtensionStartupCode(builder);
}

return builder;
}
Expand Down

0 comments on commit 5cb04e7

Please sign in to comment.