Skip to content

Commit

Permalink
add getJobDefinition
Browse files Browse the repository at this point in the history
  • Loading branch information
andrii-i committed Oct 6, 2022
1 parent 89a0ed4 commit c2be337
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,25 @@ export class SchedulerService {
options.serverSettings || ServerConnection.makeSettings();
}

async getJobDefinition(
definition_id: string
): Promise<Scheduler.IDescribeJobDefinition> {
let data;

try {
data = await requestAPI(
this.serverSettings,
`job_definitions/${definition_id}`,
{
method: 'GET'
}
);
} catch (e: any) {
console.error(e);
}
return data as Scheduler.IDescribeJobDefinition;
}

async getJobDefinitions(
definition_id: string
): Promise<Scheduler.IDescribeJobDefinition[]> {
Expand Down

0 comments on commit c2be337

Please sign in to comment.