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

Method PostStartup

rest/server_context.go:258–263  ·  view source on GitHub ↗

PostStartup runs anything that relies on SG being fully started (i.e. sgreplicate)

()

Source from the content-addressed store, hash-verified

256
257// PostStartup runs anything that relies on SG being fully started (i.e. sgreplicate)
258func (sc *ServerContext) PostStartup() {
259 // Delay DatabaseContext processes starting up, e.g. to avoid replication reassignment churn when a Sync Gateway Cluster is being initialized
260 // TODO: Consider sc.WaitForRESTAPIs for faster startup?
261 time.Sleep(5 * time.Second)
262 close(sc.hasStarted)
263}
264
265// serverContextStopMaxWait is the maximum amount of time to wait for
266// background goroutines to terminate before the server is stopped.

Callers 1

StartServerFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected