OSS 稽查修改 ,新增健康检查

This commit is contained in:
2023-11-24 11:19:41 +08:00
parent da746c0e66
commit c4f0b0d60d
4 changed files with 42 additions and 2 deletions
@@ -563,7 +563,7 @@ namespace IRaCIS.Core.API.Controllers
templateFileStream.Seek(0, SeekOrigin.Begin);
var ossRelativePath = oSSService.UploadToOSS(fileStream, "InspectionUpload/SiteSurvey", realFileName);
var ossRelativePath = oSSService.UploadToOSS(fileStream, "InspectionUpload/Check", realFileName);
await _repository.AddAsync(new InspectionFile() { FileName = realFileName, RelativePath = ossRelativePath, TrialId = trialId });
+6
View File
@@ -71,6 +71,8 @@ namespace IRaCIS.Core.API
// This method gets called by the runtime. Use this method to add services to the container.
public void ConfigureServices(IServiceCollection services)
{
//健康检查
services.AddHealthChecks();
//本地化
services.AddJsonLocalization(options => options.ResourcesPath = "Resources");
@@ -167,6 +169,8 @@ namespace IRaCIS.Core.API
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public async void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
//本地化
app.UseLocalization();
@@ -234,6 +238,8 @@ namespace IRaCIS.Core.API
endpoints.MapControllers();
endpoints.MapHub<UploadHub>("/UploadHub");
endpoints.MapHealthChecks("/health");
});
var hangfireJobService = app.ApplicationServices.GetRequiredService<IIRaCISHangfireJob>();