Skip to content

Commit 53ff70b

Browse files
committed
feat: Module shotdown and cancels the initialization token
1 parent 44ce226 commit 53ff70b

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.Elasticsearch/LINGYUN/Abp/AuditLogging/Elasticsearch/AbpAuditLoggingElasticsearchModule.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,10 @@ public async override Task OnApplicationInitializationAsync(ApplicationInitializ
3535
var initializer = rootServiceProvider.GetRequiredService<IAuditLoggingIndexInitializer>();
3636
await initializer.InitializeAsync(_cancellationTokenSource.Token);
3737
}
38+
39+
public override Task OnApplicationShutdownAsync(ApplicationShutdownContext context)
40+
{
41+
_cancellationTokenSource.Cancel();
42+
return Task.CompletedTask;
43+
}
3844
}

0 commit comments

Comments
 (0)