Skip to content

Commit

Permalink
Merge pull request #772 from fthorntonai/main
Browse files Browse the repository at this point in the history
MeteredTriggerJob failing due to Unhandled exception
  • Loading branch information
santhoshb-msft authored Oct 7, 2024
2 parents 2102f20 + 202f685 commit cdcd486
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/MeteredTriggerJob/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ static void Main (string[] args)
};

var creds = new ClientSecretCredential(config.TenantId.ToString(), config.ClientId.ToString(), config.ClientSecret);
var versionInfo = FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location);
var versionInfo = new AppVersionService(Assembly.GetExecutingAssembly()?.GetName()?.Version);

var services = new ServiceCollection()
.AddDbContext<SaasKitContext>(options => options.UseSqlServer(configuration.GetConnectionString("DefaultConnection")), ServiceLifetime.Transient)
Expand All @@ -56,7 +56,7 @@ static void Main (string[] args)
.AddScoped<IApplicationConfigRepository, ApplicationConfigRepository>()
.AddSingleton<IMeteredBillingApiService>(new MeteredBillingApiService(new MarketplaceMeteringClient(creds), config, new SaaSClientLogger<MeteredBillingApiService>()))
.AddSingleton<Executor, Executor>()
.AddSingleton<IAppVersionService>(new AppVersionService(versionInfo))
.AddSingleton<IAppVersionService>(versionInfo)
.BuildServiceProvider();

services
Expand Down

0 comments on commit cdcd486

Please sign in to comment.