Sync branch magefile with main #104308
@ -742,7 +742,7 @@ func convertSqlcJob(job sqlc.Job) (*Job, error) {
|
||||
CreatedAt: job.CreatedAt,
|
||||
UpdatedAt: job.UpdatedAt.Time,
|
||||
},
|
||||
UUID: job.Uuid,
|
||||
UUID: job.UUID,
|
||||
Name: job.Name,
|
||||
JobType: job.JobType,
|
||||
Priority: int(job.Priority),
|
||||
@ -755,11 +755,11 @@ func convertSqlcJob(job sqlc.Job) (*Job, error) {
|
||||
}
|
||||
|
||||
if err := json.Unmarshal(job.Settings, &dbJob.Settings); err != nil {
|
||||
return nil, jobError(err, fmt.Sprintf("job %s has invalid settings: %v", job.Uuid, err))
|
||||
return nil, jobError(err, fmt.Sprintf("job %s has invalid settings: %v", job.UUID, err))
|
||||
}
|
||||
|
||||
if err := json.Unmarshal(job.Metadata, &dbJob.Metadata); err != nil {
|
||||
return nil, jobError(err, fmt.Sprintf("job %s has invalid metadata: %v", job.Uuid, err))
|
||||
return nil, jobError(err, fmt.Sprintf("job %s has invalid metadata: %v", job.UUID, err))
|
||||
}
|
||||
|
||||
if job.WorkerTagID.Valid {
|
||||
|
@ -14,7 +14,7 @@ type Job struct {
|
||||
ID int64
|
||||
CreatedAt time.Time
|
||||
UpdatedAt sql.NullTime
|
||||
Uuid string
|
||||
UUID string
|
||||
Name string
|
||||
JobType string
|
||||
Priority int64
|
||||
@ -58,7 +58,7 @@ type Task struct {
|
||||
ID int64
|
||||
CreatedAt time.Time
|
||||
UpdatedAt sql.NullTime
|
||||
Uuid string
|
||||
UUID string
|
||||
Name string
|
||||
Type string
|
||||
JobID int64
|
||||
@ -85,7 +85,7 @@ type Worker struct {
|
||||
ID int64
|
||||
CreatedAt time.Time
|
||||
UpdatedAt sql.NullTime
|
||||
Uuid string
|
||||
UUID string
|
||||
Secret string
|
||||
Name string
|
||||
Address string
|
||||
@ -104,7 +104,7 @@ type WorkerTag struct {
|
||||
ID int64
|
||||
CreatedAt time.Time
|
||||
UpdatedAt sql.NullTime
|
||||
Uuid string
|
||||
UUID string
|
||||
Name string
|
||||
Description string
|
||||
}
|
||||
|
@ -31,7 +31,7 @@ VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )
|
||||
|
||||
type CreateJobParams struct {
|
||||
CreatedAt time.Time
|
||||
Uuid string
|
||||
UUID string
|
||||
Name string
|
||||
JobType string
|
||||
Priority int64
|
||||
@ -46,7 +46,7 @@ type CreateJobParams struct {
|
||||
func (q *Queries) CreateJob(ctx context.Context, arg CreateJobParams) error {
|
||||
_, err := q.db.ExecContext(ctx, createJob,
|
||||
arg.CreatedAt,
|
||||
arg.Uuid,
|
||||
arg.UUID,
|
||||
arg.Name,
|
||||
arg.JobType,
|
||||
arg.Priority,
|
||||
@ -80,7 +80,7 @@ func (q *Queries) FetchJob(ctx context.Context, uuid string) (Job, error) {
|
||||
&i.ID,
|
||||
&i.CreatedAt,
|
||||
&i.UpdatedAt,
|
||||
&i.Uuid,
|
||||
&i.UUID,
|
||||
&i.Name,
|
||||
&i.JobType,
|
||||
&i.Priority,
|
||||
@ -107,7 +107,7 @@ func (q *Queries) FetchTask(ctx context.Context, uuid string) (Task, error) {
|
||||
&i.ID,
|
||||
&i.CreatedAt,
|
||||
&i.UpdatedAt,
|
||||
&i.Uuid,
|
||||
&i.UUID,
|
||||
&i.Name,
|
||||
&i.Type,
|
||||
&i.JobID,
|
||||
|
Loading…
Reference in New Issue
Block a user