MCPcopy Index your code
hub / github.com/cloudgraphdev/cli / findExistingDGraphContainerId

Function findExistingDGraphContainerId

src/utils/index.ts:219–235  ·  view source on GitHub ↗
(
  statusFilter: string
)

Source from the content-addressed store, hash-verified

217}
218
219export const findExistingDGraphContainerId = async (
220 statusFilter: string
221): Promise<string> => {
222 let result: string
223 let stdout: any
224 stdout = await execCommand(
225 `docker ps --filter label=${DGRAPH_CONTAINER_LABEL} --filter status=${statusFilter} --quiet`
226 )
227 result = stdout.trim()
228 if (!result) {
229 stdout = await execCommand(
230 `docker ps --filter name=dgraph --filter status=${statusFilter} --quiet`
231 )
232 result = stdout.trim()
233 }
234 return result
235}
236
237export const fileUtils = {
238 mapFileNameToHumanReadable,

Callers 3

stopDgraphContainerFunction · 0.90
runMethod · 0.90
runMethod · 0.90

Calls 1

execCommandFunction · 0.85

Tested by

no test coverage detected