Skip to content

Commit

Permalink
Merge pull request #641 from SavageLearning/troubleshoot-docker
Browse files Browse the repository at this point in the history
Troubleshoot docker
  • Loading branch information
chaim1221 authored Feb 26, 2021
2 parents 42549aa + ab56862 commit 170d424
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions Machete.Web/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -273,13 +273,18 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env)
RequestPath = "/Content"
});


using (var serviceScope = app.ApplicationServices.CreateScope())
{
var services = serviceScope.ServiceProvider;
var svc = services.GetService<ILookupService>();
//svc.populateStaticIds();
}
// The following code is trying to get lookup static IDs as if they were coming from a singleton database.
// It ignores the fact that the database provider is multi-tenant, and does not expose a singleton tenant.
//
// Alas, the serviceScope object does nothing anyway as the line which populates static IDs is commented out.
// The apparent purpose is better achieved by improving the Lookups initialization (above).
//
// using (var serviceScope = app.ApplicationServices.CreateScope())
// {
// var services = serviceScope.ServiceProvider;
// var svc = services.GetService<ILookupService>();
// //svc.populateStaticIds();
// }
}
}
}

0 comments on commit 170d424

Please sign in to comment.