Edits history of script submission #1114 for ' list all queued jobs (windmill)'

  • nativets
    One script reply has been approved by the moderators
    Ap­pro­ved
    /**
     * list all queued jobs
     *
     */
    export async function main(
      workspace: string,
      order_desc: string | undefined,
      created_by: string | undefined,
      parent_job: string | undefined,
      script_path_exact: string | undefined,
      script_path_start: string | undefined,
      schedule_path: string | undefined,
      script_hash: string | undefined,
      started_before: string | undefined,
      started_after: string | undefined,
      success: string | undefined,
      scheduled_for_before_now: string | undefined,
      job_kinds: string | undefined,
      suspended: string | undefined,
      running: string | undefined,
      args: string | undefined,
      result: string | undefined,
      tag: string | undefined,
      all_workspaces: string | undefined
    ) {
      const url = new URL(`${BASE_URL}/api/w/${workspace}/jobs/queue/list`);
      for (const [k, v] of [
        ["order_desc", order_desc],
        ["created_by", created_by],
        ["parent_job", parent_job],
        ["script_path_exact", script_path_exact],
        ["script_path_start", script_path_start],
        ["schedule_path", schedule_path],
        ["script_hash", script_hash],
        ["started_before", started_before],
        ["started_after", started_after],
        ["success", success],
        ["scheduled_for_before_now", scheduled_for_before_now],
        ["job_kinds", job_kinds],
        ["suspended", suspended],
        ["running", running],
        ["args", args],
        ["result", result],
        ["tag", tag],
        ["all_workspaces", all_workspaces],
      ]) {
        if (v !== undefined && v !== "") {
          url.searchParams.append(k, v);
        }
      }
      const response = await fetch(url, {
        method: "GET",
        headers: {
          Authorization: "Bearer " + WM_TOKEN,
        },
        body: undefined,
      });
      if (!response.ok) {
        const text = await response.text();
        throw new Error(`${response.status} ${text}`);
      }
      return await response.json();
    }
    

    Submitted by hugo697 370 days ago

  • nativets
    /**
     * list all queued jobs
     *
     */
    export async function main(
      workspace: string,
      order_desc: string | undefined,
      created_by: string | undefined,
      parent_job: string | undefined,
      script_path_exact: string | undefined,
      script_path_start: string | undefined,
      schedule_path: string | undefined,
      script_hash: string | undefined,
      started_before: string | undefined,
      started_after: string | undefined,
      success: string | undefined,
      scheduled_for_before_now: string | undefined,
      job_kinds: string | undefined,
      suspended: string | undefined,
      running: string | undefined,
      args: string | undefined,
      result: string | undefined,
      tag: string | undefined,
      all_workspaces: string | undefined
    ) {
      const url = new URL(`${BASE_URL}/api/w/${workspace}/jobs/queue/list`);
      for (const [k, v] of [
        ["order_desc", order_desc],
        ["created_by", created_by],
        ["parent_job", parent_job],
        ["script_path_exact", script_path_exact],
        ["script_path_start", script_path_start],
        ["schedule_path", schedule_path],
        ["script_hash", script_hash],
        ["started_before", started_before],
        ["started_after", started_after],
        ["success", success],
        ["scheduled_for_before_now", scheduled_for_before_now],
        ["job_kinds", job_kinds],
        ["suspended", suspended],
        ["running", running],
        ["args", args],
        ["result", result],
        ["tag", tag],
        ["all_workspaces", all_workspaces],
      ]) {
        if (v !== undefined && v !== "") {
          url.searchParams.append(k, v);
        }
      }
      const response = await fetch(url, {
        method: "GET",
        headers: {
          Authorization: "Bearer " + WM_TOKEN,
        },
        body: undefined,
      });
      if (!response.ok) {
        const text = await response.text();
        throw new Error(`${response.status} ${text}`);
      }
      return await response.json();
    }
    

    Submitted by hugo697 797 days ago

  • nativets
    /**
     * list all queued jobs
     *
     */
    export async function main(
      workspace: string,
      order_desc: string | undefined,
      created_by: string | undefined,
      parent_job: string | undefined,
      script_path_exact: string | undefined,
      script_path_start: string | undefined,
      schedule_path: string | undefined,
      script_hash: string | undefined,
      started_before: string | undefined,
      started_after: string | undefined,
      success: string | undefined,
      job_kinds: string | undefined,
      suspended: string | undefined,
      running: string | undefined,
      args: string | undefined,
      result: string | undefined,
      tag: string | undefined
    ) {
      const url = new URL(`${BASE_URL}/api/w/${workspace}/jobs/queue/list`);
      for (const [k, v] of [
        ["order_desc", order_desc],
        ["created_by", created_by],
        ["parent_job", parent_job],
        ["script_path_exact", script_path_exact],
        ["script_path_start", script_path_start],
        ["schedule_path", schedule_path],
        ["script_hash", script_hash],
        ["started_before", started_before],
        ["started_after", started_after],
        ["success", success],
        ["job_kinds", job_kinds],
        ["suspended", suspended],
        ["running", running],
        ["args", args],
        ["result", result],
        ["tag", tag],
      ]) {
        if (v !== undefined && v !== "") {
          url.searchParams.append(k, v);
        }
      }
      const response = await fetch(url, {
        method: "GET",
        headers: {
          Authorization: "Bearer " + WM_TOKEN,
        },
        body: undefined,
      });
      if (!response.ok) {
        const text = await response.text();
        throw new Error(`${response.status} ${text}`);
      }
      return await response.json();
    }
    

    Submitted by hugo697 931 days ago

  • nativets
    /**
     * list all queued jobs
     *
     */
    export async function main(
      workspace: string,
      order_desc: string | undefined,
      created_by: string | undefined,
      parent_job: string | undefined,
      script_path_exact: string | undefined,
      script_path_start: string | undefined,
      schedule_path: string | undefined,
      script_hash: string | undefined,
      started_before: string | undefined,
      started_after: string | undefined,
      success: string | undefined,
      job_kinds: string | undefined,
      suspended: string | undefined,
      running: string | undefined,
      args: string | undefined,
      result: string | undefined,
      tag: string | undefined
    ) {
      const url = new URL(`${BASE_URL}/api/w/${workspace}/jobs/queue/list`);
      for (const [k, v] of [
        ["order_desc", order_desc],
        ["created_by", created_by],
        ["parent_job", parent_job],
        ["script_path_exact", script_path_exact],
        ["script_path_start", script_path_start],
        ["schedule_path", schedule_path],
        ["script_hash", script_hash],
        ["started_before", started_before],
        ["started_after", started_after],
        ["success", success],
        ["job_kinds", job_kinds],
        ["suspended", suspended],
        ["running", running],
        ["args", args],
        ["result", result],
        ["tag", tag],
      ]) {
        if (v !== undefined) {
          url.searchParams.append(k, v);
        }
      }
      const response = await fetch(url, {
        method: "GET",
        headers: {
          Authorization: "Bearer " + WM_TOKEN,
        },
        body: undefined,
      });
      return await response.json();
    }
    

    Submitted by rubenfiszel 933 days ago

  • nativets
    /**
     * list all queued jobs
     *
     */
    export async function main(
      workspace: string,
      order_desc: string | undefined,
      created_by: string | undefined,
      parent_job: string | undefined,
      script_path_exact: string | undefined,
      script_path_start: string | undefined,
      schedule_path: string | undefined,
      script_hash: string | undefined,
      started_before: string | undefined,
      started_after: string | undefined,
      success: string | undefined,
      job_kinds: string | undefined,
      suspended: string | undefined,
      running: string | undefined,
      args: string | undefined,
      result: string | undefined,
      tag: string | undefined,
    ) {
      const url = new URL(`${BASE_URL}/api/w/${workspace}/jobs/queue/list`);
      for (const [k, v] of [
        ["order_desc", order_desc],
        ["created_by", created_by],
        ["parent_job", parent_job],
        ["script_path_exact", script_path_exact],
        ["script_path_start", script_path_start],
        ["schedule_path", schedule_path],
        ["script_hash", script_hash],
        ["started_before", started_before],
        ["started_after", started_after],
        ["success", success],
        ["job_kinds", job_kinds],
        ["suspended", suspended],
        ["running", running],
        ["args", args],
        ["result", result],
        ["tag", tag],
      ]) {
        if (v !== undefined) {
          url.searchParams.append(k, v);
        }
      }
      const response = await fetch(url, {
        method: "GET",
        headers: {
          Authorization: "Bearer " + WM_TOKEN,
        },
        body: undefined,
      });
      return await response.json();
    }
    

    Submitted by admin 933 days ago