perf(core): Make execution queries faster (#9817)
This commit is contained in:
@@ -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' },
|
||||
}),
|
||||
]);
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@ export namespace ExecutionSummaries {
|
||||
type OrderFields = {
|
||||
order?: {
|
||||
top?: ExecutionStatus;
|
||||
stoppedAt?: 'DESC';
|
||||
startedAt?: 'DESC';
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user