(graceful bool, newStatus string, destroy bool)
| 237 | } |
| 238 | |
| 239 | func (c *TsunamiController) Stop(graceful bool, newStatus string, destroy bool) { |
| 240 | log.Printf("TsunamiController.Stop called for block %s (graceful: %t, newStatus: %s)", c.blockId, graceful, newStatus) |
| 241 | c.runLock.Lock() |
| 242 | defer c.runLock.Unlock() |
| 243 | |
| 244 | if c.tsunamiProc == nil { |
| 245 | return |
| 246 | } |
| 247 | |
| 248 | if c.tsunamiProc.Cmd.Process != nil { |
| 249 | c.tsunamiProc.Cmd.Process.Kill() |
| 250 | } |
| 251 | |
| 252 | if c.tsunamiProc.StdinWriter != nil { |
| 253 | c.tsunamiProc.StdinWriter.Close() |
| 254 | } |
| 255 | |
| 256 | c.tsunamiProc = nil |
| 257 | if newStatus == "" { |
| 258 | newStatus = Status_Done |
| 259 | } |
| 260 | c.WithStatusLock(func() { |
| 261 | c.status = newStatus |
| 262 | c.port = 0 |
| 263 | }) |
| 264 | c.clearSchemas() |
| 265 | go c.sendStatusUpdate() |
| 266 | } |
| 267 | |
| 268 | func (c *TsunamiController) GetRuntimeStatus() *BlockControllerRuntimeStatus { |
| 269 | var rtn *BlockControllerRuntimeStatus |
nothing calls this directly
no test coverage detected