mirror of
https://github.com/go-gitea/gitea
synced 2025-12-07 13:28:25 +00:00
feat: tranfer log to storage
This commit is contained in:
+2
-2
@@ -213,7 +213,7 @@ func CreateTaskForRunner(runner *Runner) (*Task, bool, error) {
|
||||
_, wolkflowJob = gots[0].Job()
|
||||
}
|
||||
|
||||
if _, err := e.Insert(ctx, task); err != nil {
|
||||
if _, err := e.Insert(task); err != nil {
|
||||
return nil, false, err
|
||||
}
|
||||
|
||||
@@ -230,7 +230,7 @@ func CreateTaskForRunner(runner *Runner) (*Task, bool, error) {
|
||||
Number: int64(i),
|
||||
}
|
||||
}
|
||||
if _, err := e.Insert(ctx, steps); err != nil {
|
||||
if _, err := e.Insert(steps); err != nil {
|
||||
return nil, false, err
|
||||
}
|
||||
task.Steps = steps
|
||||
|
||||
+15
-14
@@ -94,20 +94,21 @@ func addBotTables(x *xorm.Engine) error {
|
||||
type BotsRunIndex db.ResourceIndex
|
||||
|
||||
type BotsTask struct {
|
||||
ID int64
|
||||
JobID int64
|
||||
Attempt int64
|
||||
RunnerID int64 `xorm:"index"`
|
||||
Result int32
|
||||
Started timeutil.TimeStamp
|
||||
Stopped timeutil.TimeStamp
|
||||
LogURL string // dbfs:///a/b.log or s3://endpoint.com/a/b.log and etc.
|
||||
LogLength int64 // lines count
|
||||
LogSize int64 // blob size
|
||||
LogIndexes *[]int64 `xorm:"BLOB"` // line number to offset
|
||||
LogExpired bool
|
||||
Created timeutil.TimeStamp `xorm:"created"`
|
||||
Updated timeutil.TimeStamp `xorm:"updated"`
|
||||
ID int64
|
||||
JobID int64
|
||||
Attempt int64
|
||||
RunnerID int64 `xorm:"index"`
|
||||
Result int32
|
||||
Started timeutil.TimeStamp
|
||||
Stopped timeutil.TimeStamp
|
||||
LogFilename string // file name of log
|
||||
LogInStorage bool // read log from database or from storage
|
||||
LogLength int64 // lines count
|
||||
LogSize int64 // blob size
|
||||
LogIndexes *[]int64 `xorm:"BLOB"` // line number to offset
|
||||
LogExpired bool
|
||||
Created timeutil.TimeStamp `xorm:"created"`
|
||||
Updated timeutil.TimeStamp `xorm:"updated"`
|
||||
}
|
||||
|
||||
type BotsTaskStep struct {
|
||||
|
||||
Reference in New Issue
Block a user