forked from p15670423/monkey
island: Log a warning if MongoDbProcess.stop() is erroniously called
This commit is contained in:
parent
e80ac4c943
commit
cc1865dc5b
|
@ -36,9 +36,13 @@ class MongoDbProcess:
|
|||
logger.info("MongoDB launched successfully!")
|
||||
|
||||
def stop(self):
|
||||
if self._process:
|
||||
if not self._process:
|
||||
logger.warning("Failed to stop MongoDB process: No process found")
|
||||
return
|
||||
|
||||
logger.info("Terminating MongoDB process")
|
||||
self._process.terminate()
|
||||
|
||||
try:
|
||||
self._process.wait(timeout=TERMINATE_TIMEOUT)
|
||||
logger.info("MongoDB process terminated successfully")
|
||||
|
|
Loading…
Reference in New Issue