Skip to content

Commit

Permalink
fix: add Get latest job runs API (#129)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mryashbhardwaj authored Oct 16, 2024
1 parent a89ef79 commit cf1aeb6
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions gotocompany/optimus/core/v1beta1/job_run.proto
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ service JobRunService {
get: "/v1beta1/project/{project_name}/job/{job_name}/run"
};
}
// JobRunList returns the current and past run status of jobs on a given range
rpc GetLatestJobRuns(GetLatestJobRunsRequest) returns (GetLatestJobRunsResponse) {
option (google.api.http) = {
get: "/v1beta1/project/{project_name}/job/{job_name}/latest-runs"
};
}
// RegisterJobEvent notifies optimus service about an event related to job
rpc RegisterJobEvent(RegisterJobEventRequest) returns (RegisterJobEventResponse) {
option (google.api.http) = {
Expand Down Expand Up @@ -111,6 +117,18 @@ message JobRunInputRequest {
string jobrun_id = 7;
}

// get latest 10 runs by schedule time
message GetLatestJobRunsRequest {
string project_name = 1;
string job_name = 2;
// state is an optional filter
string state = 3;
}

message GetLatestJobRunsResponse {
repeated JobRun job_runs = 1;
}

message JobRunRequest {
string project_name = 1;
string job_name = 2;
Expand Down

0 comments on commit cf1aeb6

Please sign in to comment.