mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-23 19:47:07 +09:00
fix: use file name for log
This commit is contained in:
1 parent
e6ad1b3233
commit
d2f8d5ded1
4 files changed
+27
-55
No files matched your search
@@ -167,12 +167,6 @@ func (s *Service) UpdateLog(
|
||||
if err != nil {
|
||||
return nil, status.Errorf(codes.Internal, "get task: %v", err)
|
||||
}
|
||||
if task.LogURL == "" {
|
||||
task.LogURL = fmt.Sprintf("dbfs:///bots/tasks/%d.log", task.ID)
|
||||
if err := bots_model.UpdateTask(ctx, task, "log_url"); err != nil {
|
||||
return nil, status.Errorf(codes.Internal, "update task: %v", err)
|
||||
}
|
||||
}
|
||||
ack := task.LogLength
|
||||
|
||||
if len(req.Msg.Rows) == 0 || req.Msg.Index > ack || int64(len(req.Msg.Rows))+req.Msg.Index <= ack {
|
||||
@@ -181,7 +175,7 @@ func (s *Service) UpdateLog(
|
||||
}
|
||||
|
||||
rows := req.Msg.Rows[ack-req.Msg.Index:]
|
||||
ns, err := bots.WriteLogs(ctx, task.LogURL, task.LogSize, rows)
|
||||
ns, err := bots.WriteLogs(ctx, task.LogFilename, task.LogSize, rows)
|
||||
if err != nil {
|
||||
return nil, status.Errorf(codes.Internal, "write logs: %v", err)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user