Reduce hot run polling pressure
This commit is contained in:
@@ -152,6 +152,7 @@ interface JobListFilter {
|
||||
runEndpointId?: string;
|
||||
state?: JobState;
|
||||
states?: JobState[];
|
||||
limit?: number;
|
||||
}
|
||||
|
||||
export class PlatformApiClient {
|
||||
@@ -925,6 +926,7 @@ function jobListQuery(serverInstanceId: string | undefined, filter: JobListFilte
|
||||
if (filter.runEndpointId) params.set("runEndpointId", filter.runEndpointId);
|
||||
if (filter.state) params.set("state", filter.state);
|
||||
if (filter.states?.length) params.set("states", filter.states.join(","));
|
||||
if (filter.limit !== undefined) params.set("limit", String(filter.limit));
|
||||
const query = params.toString();
|
||||
return query ? `?${query}` : "";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user