()
| 267 | } |
| 268 | |
| 269 | func (b *BackgroundManager) getStatusLocal() ([]byte, []byte, error) { |
| 270 | b.lock.Lock() |
| 271 | defer b.lock.Unlock() |
| 272 | |
| 273 | backgroundStatus := b.BackgroundManagerStatus |
| 274 | if string(backgroundStatus.State) == "" { |
| 275 | backgroundStatus.State = BackgroundProcessStateCompleted |
| 276 | } |
| 277 | |
| 278 | if b.lastError != nil { |
| 279 | backgroundStatus.LastErrorMessage = b.lastError.Error() |
| 280 | } |
| 281 | |
| 282 | return b.Process.GetProcessStatus(backgroundStatus) |
| 283 | } |
| 284 | |
| 285 | func (b *BackgroundManager) getStatusFromCluster(ctx context.Context) ([]byte, error) { |
| 286 | status, statusCas, err := b.clusterAwareOptions.metadataStore.GetSubDocRaw(ctx, b.clusterAwareOptions.StatusDocID(), "status") |
no test coverage detected