mirror of
https://github.com/go-gitea/gitea.git
synced 2025-07-27 07:44:43 +02:00
chore: log updating task
This commit is contained in:
parent
ce39e45cc2
commit
5d83ffa658
@ -165,6 +165,12 @@ func (s *Service) UpdateTask(
|
|||||||
ctx context.Context,
|
ctx context.Context,
|
||||||
req *connect.Request[runnerv1.UpdateTaskRequest],
|
req *connect.Request[runnerv1.UpdateTaskRequest],
|
||||||
) (*connect.Response[runnerv1.UpdateTaskResponse], error) {
|
) (*connect.Response[runnerv1.UpdateTaskResponse], error) {
|
||||||
|
{
|
||||||
|
// to debug strange runner behaviors, it could be removed if all problems have been solved.
|
||||||
|
stateMsg, _ := json.Marshal(req.Msg.State)
|
||||||
|
log.Trace("update task with state: %s", stateMsg)
|
||||||
|
}
|
||||||
|
|
||||||
// Get Task first
|
// Get Task first
|
||||||
task, err := bots_model.GetTaskByID(ctx, req.Msg.State.Id)
|
task, err := bots_model.GetTaskByID(ctx, req.Msg.State.Id)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -11,9 +11,9 @@ import (
|
|||||||
bots_model "code.gitea.io/gitea/models/bots"
|
bots_model "code.gitea.io/gitea/models/bots"
|
||||||
"code.gitea.io/gitea/modules/log"
|
"code.gitea.io/gitea/modules/log"
|
||||||
"code.gitea.io/gitea/modules/timeutil"
|
"code.gitea.io/gitea/modules/timeutil"
|
||||||
|
|
||||||
"gitea.com/gitea/act_runner/core"
|
"gitea.com/gitea/act_runner/core"
|
||||||
runnerv1 "gitea.com/gitea/proto-go/runner/v1"
|
runnerv1 "gitea.com/gitea/proto-go/runner/v1"
|
||||||
|
|
||||||
"github.com/bufbuild/connect-go"
|
"github.com/bufbuild/connect-go"
|
||||||
"google.golang.org/grpc/codes"
|
"google.golang.org/grpc/codes"
|
||||||
"google.golang.org/grpc/status"
|
"google.golang.org/grpc/status"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user