mirror of
https://github.com/dadosfera/maestro.git
synced 2026-10-31 15:39:07 +00:00
FIX: do not throw errors when deleting input or transformation on pipeline delete
This commit is contained in:
@@ -169,20 +169,32 @@ export class PipelinesService implements OnModuleInit {
|
||||
? JSON.parse(pipeline.config.tables)
|
||||
: null;
|
||||
if (input)
|
||||
await this.inputsService.remove({
|
||||
id: input.input_id,
|
||||
info,
|
||||
});
|
||||
await this.inputsService
|
||||
.remove({
|
||||
id: input.input_id,
|
||||
info,
|
||||
})
|
||||
.catch((error) =>
|
||||
this.logger.error('Could not delete input', {
|
||||
data: { input, error },
|
||||
}),
|
||||
);
|
||||
|
||||
const transformations: { id: string }[] = pipeline.transformations
|
||||
? JSON.parse(pipeline.transformations)
|
||||
: null;
|
||||
if (transformations && transformations.length)
|
||||
for (const transformation of transformations) {
|
||||
await this.transformationsService.remove({
|
||||
id: transformation.id,
|
||||
info,
|
||||
});
|
||||
await this.transformationsService
|
||||
.remove({
|
||||
id: transformation.id,
|
||||
info,
|
||||
})
|
||||
.catch((error) =>
|
||||
this.logger.error('Could not delete transformation', {
|
||||
data: { transformation, error },
|
||||
}),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user