perf(core): Make execution queries faster (#9817)

This commit is contained in:
Iván Ovejero
2024-08-22 13:27:45 +02:00
committed by GitHub
parent 3428f28a73
commit dc7dc995d5
11 changed files with 167 additions and 12 deletions

View File

@@ -361,7 +361,7 @@ export class ExecutionService {
/**
* Return:
*
* - the latest summaries of current and completed executions that satisfy a query,
* - the summaries of latest current and completed executions that satisfy a query,
* - the total count of all completed executions that satisfy the query, and
* - whether the total of completed executions is an estimate.
*
@@ -382,7 +382,7 @@ export class ExecutionService {
this.findRangeWithCount({
...query,
status: completedStatuses,
order: { stoppedAt: 'DESC' },
order: { startedAt: 'DESC' },
}),
]);

View File

@@ -86,7 +86,7 @@ export namespace ExecutionSummaries {
type OrderFields = {
order?: {
top?: ExecutionStatus;
stoppedAt?: 'DESC';
startedAt?: 'DESC';
};
};