Skip to content

Commit

Permalink
[init-delay-postgres] init delay transform epsilon
Browse files Browse the repository at this point in the history
  • Loading branch information
truongnguyen101195 committed Apr 16, 2021
1 parent 8878b6c commit 8b81ba1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions job/storage/postgres/postgres.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,16 @@ func (d DB) GetAll() ([]*job.Job, error) {
}
err = nil
jobs := []*job.Job{}
result := make([]*job.Job, 0, len(jobs))
if r.Valid {
err = json.Unmarshal([]byte(r.String), &jobs)
}
for _, j := range jobs {
if err = j.InitDelayDuration(false); err != nil {
break
}
result = append(result, j)
}
return jobs, err
}

Expand Down

0 comments on commit 8b81ba1

Please sign in to comment.