Reduce unnecessary DB queries for Actions tasks #10

Merged
lunny merged 5 commits from sillyguodong/actions-proto-def:feature/fetch_with_task_index into main 2023-06-12 08:16:27 +00:00

@ -27,10 +27,13 @@ message DeclareResponse {
Runner runner = 1;
}
message FetchTaskRequest {}
message FetchTaskRequest {
int64 tasks_version = 1; // Runner use `tasks_version` to compare with Gitea and detemine whether new tasks may exist.
sillyguodong marked this conversation as resolved Outdated

task_version does't look good to me. It's not "the version of a task."

I don't have a good idea, but maybe tasks_version could be better? It's the version of whole tasks data.

`task_version` does't look good to me. It's not "the version of a task." I don't have a good idea, but maybe `tasks_version` could be better? It's the version of whole tasks data.
}
message FetchTaskResponse {
Task task = 1;
int64 tasks_version = 2; // Gitea informs the Runner of the latest version of tasks through `tasks_version`.
}
message UpdateTaskRequest {