MCPcopy Create free account
hub / github.com/couchbase/sync_gateway / getStatusLocal

Method getStatusLocal

db/background_mgr.go:269–283  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

267}
268
269func (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
285func (b *BackgroundManager) getStatusFromCluster(ctx context.Context) ([]byte, error) {
286 status, statusCas, err := b.clusterAwareOptions.metadataStore.GetSubDocRaw(ctx, b.clusterAwareOptions.StatusDocID(), "status")

Callers 3

GetStatusMethod · 0.95
getStatusFromClusterMethod · 0.95

Calls 4

GetProcessStatusMethod · 0.65
LockMethod · 0.45
UnlockMethod · 0.45
ErrorMethod · 0.45

Tested by

no test coverage detected