//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
})
/**
* Get Job
* Get a job (queued, running or completed) by id: status, args, result, timings. Logs are left out; use Get Job Logs for them.
*/
export async function main(id: string) {
return await wmill.JobService.getJob({
workspace: wmill.getWorkspace(),
id,
noLogs: true,
})
}
Submitted by hugo989 5 hours ago