MCPcopy
hub / github.com/grafana/tempo / failJob

Method failJob

modules/backendworker/backendworker.go:433–453  ·  view source on GitHub ↗
(ctx context.Context, jobID string, errMsg string)

Source from the content-addressed store, hash-verified

431}
432
433func (w *BackendWorker) failJob(ctx context.Context, jobID string, errMsg string) error {
434 level.Error(log.Logger).Log("msg", "job failed", "job_id", jobID, "error", errMsg)
435
436 err := w.callSchedulerWithBackoff(ctx, func(ctx context.Context) error {
437 _, err := w.backendScheduler.UpdateJob(ctx, &tempopb.UpdateJobStatusRequest{
438 JobId: jobID,
439 Status: tempopb.JobStatus_JOB_STATUS_FAILED,
440 Error: errMsg,
441 })
442 if err != nil {
443 return fmt.Errorf("failed marking job %q as failed: %w", jobID, err)
444 }
445
446 return nil
447 })
448 if err != nil {
449 return fmt.Errorf("error marking job %q as failed: %w", jobID, err)
450 }
451
452 return fmt.Errorf("%s", errMsg)
453}
454
455func (w *BackendWorker) compact(ctx context.Context, blockMetas []*backend.BlockMeta, tenantID string) ([]*backend.BlockMeta, error) {
456 return w.store.CompactWithConfig(ctx, blockMetas, tenantID, &w.cfg.Compactor, w, w)

Callers 3

processCompactionJobMethod · 0.95
processRetentionJobMethod · 0.95
processRedactionJobMethod · 0.95

Calls 4

LogMethod · 0.65
ErrorMethod · 0.65
UpdateJobMethod · 0.65

Tested by

no test coverage detected