//native
import * as wmill from "windmill-client"
// windmill-client errors only carry the status text: throw the response body, which says why
wmill.OpenAPI.interceptors.response.use(async (response) => {
if (!response.ok) {
throw new Error(`${response.status} ${await response.text()}`)
}
return response
})
/**
* List Suspended Jobs
* List jobs suspended on an approval or a sleep step, optionally only those of one flow path.
*/
export async function main(
script_path_exact: string | undefined,
per_page: number | undefined
) {
return await wmill.JobService.listQueue({
workspace: wmill.getWorkspace(),
suspended: true,
scriptPathExact: script_path_exact || undefined,
perPage: per_page ?? undefined,
})
}
Submitted by hugo989 14 days ago
//native
import * as wmill from "windmill-client@1";
export async function main(scriptPathExact?: string) {
return wmill.JobService.listQueue({
workspace: wmill.getWorkspace(),
suspend: true,
perPage: 50,
scriptPathExact,
});
}
Submitted by hugo989 148 days ago