Skip to content
Merged
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
19 changes: 18 additions & 1 deletion apis/workflows/v1/task.proto
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,27 @@ message ComputedTask {
repeated TaskSubmission sub_tasks = 3 [(buf.validate.field).repeated.max_items = 64];
}

// IdlingResponse is set in the response of a NextTaskRequest if no task was returned, indicating that the requesting
// task runner should idle.
message IdlingResponse {
// The suggested duration the task runner should idle for before sending another request for a task.
google.protobuf.Duration suggested_idling_duration = 1;
}

// NextTaskResponse is the response to the NextTask request.
// Right now it only contains the next task to run. Wrapped in a message to allow adding more fields later if needed.
// If the NextTask request contained a request for a task, the response will either contain a next_task, or an idling
// response, but not both.
// If the NextTask request did not contain a request for a next task (indicating the the runner is about to shut down),
// the response will be empty.
message NextTaskResponse {
option (buf.validate.message).oneof = {
fields: [
"next_task",
"idling"
]
};
Task next_task = 1;
IdlingResponse idling = 2;
}

// TaskFailedRequest is the request for marking a task as failed.
Expand Down