mirror of
https://github.com/dadosfera/maestro.git
synced 2026-11-12 10:39:08 +00:00
REF: remove last_run_status tracking and related Elasticsearch update logic from pipeline cancellation
This commit is contained in:
@@ -50,8 +50,6 @@ interface PipelineDocument {
|
||||
type: string;
|
||||
in_use: number;
|
||||
keywords: MultiLangArray;
|
||||
// Pipeline run tracking
|
||||
last_run_status?: string;
|
||||
}
|
||||
|
||||
@Injectable()
|
||||
@@ -360,44 +358,6 @@ export class ElasticsearchService {
|
||||
}
|
||||
}
|
||||
|
||||
async updateLastRunStatus(
|
||||
customerName: string,
|
||||
pipelineId: string,
|
||||
lastRunStatus: string,
|
||||
): Promise<any> {
|
||||
const index = this.getIndex(customerName);
|
||||
const now = new Date().toISOString();
|
||||
|
||||
this.logger.info('Elasticsearch: Updating last run status', {
|
||||
index,
|
||||
pipelineId,
|
||||
lastRunStatus,
|
||||
});
|
||||
|
||||
try {
|
||||
const response = await this.client.post(
|
||||
`/${index}/_update/${pipelineId}`,
|
||||
{
|
||||
doc: {
|
||||
last_run_status: lastRunStatus,
|
||||
updated_at: now,
|
||||
},
|
||||
},
|
||||
{ params: { refresh: 'wait_for' } },
|
||||
);
|
||||
|
||||
this.logger.info('Elasticsearch: Last run status updated', {
|
||||
pipelineId,
|
||||
result: response.data.result,
|
||||
});
|
||||
|
||||
return response.data;
|
||||
} catch (error) {
|
||||
this.handleError('updateLastRunStatus', error, { pipelineId, index });
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
private getDataAssetIndex(customerName: string): string {
|
||||
return `${customerName}_data_assets_catalog`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user