FailJob marks a job as failed in the appropriate shard
(id string)
| 337 | |
| 338 | // FailJob marks a job as failed in the appropriate shard |
| 339 | func (w *Work) FailJob(id string) { |
| 340 | shard := w.getShard(id) |
| 341 | shard.mtx.Lock() |
| 342 | var j *Job |
| 343 | if jj, ok := shard.Jobs[id]; ok { |
| 344 | jj.Fail() |
| 345 | j = jj |
| 346 | } |
| 347 | shard.mtx.Unlock() |
| 348 | |
| 349 | if j != nil { |
| 350 | w.pendingMtx.Lock() |
| 351 | for _, key := range runningBlockKeys(j) { |
| 352 | delete(w.runningBlocks, key) |
| 353 | } |
| 354 | w.pendingMtx.Unlock() |
| 355 | } |
| 356 | } |
| 357 | |
| 358 | // SetJobCompactionOutput sets compaction output for a job in the appropriate shard |
| 359 | func (w *Work) SetJobCompactionOutput(id string, output []string) { |
nothing calls this directly
no test coverage detected