mirror of
https://github.com/morluto/rea.git
synced 2026-12-05 22:41:36 +00:00
refactor(resources): share provider descriptor cleanup (#14425)
This commit is contained in:
1 parent
efeac85e0f
commit
adb4679449
30 files changed
+213
-326
No files matched your search
@@ -1,7 +1,7 @@
|
||||
import { parseLimitConstraint } from "../../domain/parseFailureAnalysisError.js";
|
||||
import {
|
||||
projectStableArtifactFailure,
|
||||
projectArtifactCloseFailure,
|
||||
closeArtifactResources,
|
||||
ArtifactReaderFailure,
|
||||
withStableArtifactHandle,
|
||||
artifactFilePrimaryFacts,
|
||||
@@ -35,16 +35,12 @@ export class KernelModuleProvider implements KernelModulePort {
|
||||
readonly identity = KERNEL_MODULE_PROVIDER;
|
||||
readonly #resources = new ArtifactResourceScope();
|
||||
|
||||
async close(): Promise<void> {
|
||||
try {
|
||||
await this.#resources.close();
|
||||
} catch (cause: unknown) {
|
||||
throw projectArtifactCloseFailure(
|
||||
cause,
|
||||
KERNEL_MODULE_PROVIDER.id,
|
||||
OPERATION,
|
||||
);
|
||||
}
|
||||
close(): Promise<void> {
|
||||
return closeArtifactResources(
|
||||
() => this.#resources.close(),
|
||||
KERNEL_MODULE_PROVIDER,
|
||||
OPERATION,
|
||||
);
|
||||
}
|
||||
|
||||
async inspect(input: InspectKernelModuleInput, options?: ExecutionOptions) {
|
||||
|
||||
Reference in new issue
Block a user