Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 0 additions & 21 deletions extensions/loom/galaxy-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,6 @@
// Galaxy API response types
// ─────────────────────────────────────────────────────────────────────────────

export interface GalaxyInvocationStepJob {
id: string;
state: string;
tool_id: string;
}

export interface GalaxyInvocationStep {
id: string;
order_index: number;
state: string | null;
jobs: GalaxyInvocationStepJob[];
}

export interface GalaxyInvocationResponse {
id: string;
state: string;
workflow_id: string;
history_id: string;
steps: GalaxyInvocationStep[];
}

/**
* Subset of GET /api/jobs/{jobId} we actually read.
* tool_version lives at the top level per Galaxy's Job.to_dict().
Expand Down
10 changes: 5 additions & 5 deletions extensions/loom/tools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ import {
upsertInvocationBlock,
type InvocationYaml,
} from "./notebook-writer";
import { getGalaxyConfig, galaxyGet, type GalaxyInvocationResponse } from "./galaxy-api";
import { getGalaxyConfig } from "./galaxy-api";
import { createGalaxyContext, getInvocations } from "@galaxyproject/galaxy-ops";
import { type ConfiguredSkillRepo, listEnabledSkillRepos, findSkillRepo } from "./skills";
import * as fs from "fs";
import * as path from "path";
Expand Down Expand Up @@ -713,10 +714,9 @@ export async function checkInvocations(

for (const block of toCheck) {
try {
const inv = await galaxyGet<GalaxyInvocationResponse>(
`/invocations/${block.invocationId}`,
signal,
);
const cfg = getGalaxyConfig()!; // guard already ran above -- cfg is non-null here
const ctx = createGalaxyContext({ baseUrl: cfg.url, apiKey: cfg.apiKey, signal });
const inv = await getInvocations({ invocationId: block.invocationId }, ctx);

const summary = { ok: 0, running: 0, queued: 0, error: 0, other: 0 };
let totalJobs = 0;
Expand Down
Loading
Loading