Mercurial > gemma
changeset 5722:0542aec69375
Be more verbose about do errors in scheduler.
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Wed, 29 May 2024 12:44:36 +0200 |
parents | 61eff98a40ae |
children | 4c8652a61eab |
files | pkg/imports/queue.go |
diffstat | 1 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/pkg/imports/queue.go Tue May 28 14:51:32 2024 +0200 +++ b/pkg/imports/queue.go Wed May 29 12:44:36 2024 +0200 @@ -420,6 +420,11 @@ return names } +// String implements [fmt/Stringer]. +func (idj *idJob) String() string { + return fmt.Sprintf("job %s [%d]", idj.kind, idj.id) +} + func (idj *idJob) nextRetry(feedback Feedback) bool { switch { case idj.waitRetry.Status != pgtype.Present && !idj.triesLeft.Valid: @@ -1044,7 +1049,7 @@ var errCleanup error if !retry { // cleanup debris if errCleanup = survive(job.CleanUp)(); errCleanup != nil { - feedback.Error("error cleanup: %v", errCleanup) + feedback.Error("error cleanup: %v %v", idj, errCleanup) } }