Skip to content

Commit c30d7d8

Browse files
tcm: add tt tcm stop command
@TarantoolBot document Title: add the tt tcm stop command. Add command tt tcm stop to gracefully terminate TCM: - Works in both modes(watchdog and interactive) - Stops all subprocesses Closes #TNTP-1993
1 parent 7143587 commit c30d7d8

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
1616
- `tt tcm start` OR `tt tcm start --path /path/to/tcm`: added the capability to run TCM in interactive mode.
1717
- `tt tcm start --watchdog`: implemented Watchdog mode for automatic restarting of TCM upon unexpected termination.
1818
- `tt tcm status`: added command to check TCM runtime status (modes: `watchdog` or `interactive`).
19+
- `tt tcm stop`: add command for graceful termination of TCM processes (modes: `watchdog` or `interactive`).
1920

2021
### Changed
2122

cli/cmd/tcm.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -178,13 +178,13 @@ func internalTcmStop(cmdCtx *cmdcontext.CmdCtx, args []string) error {
178178
if err != nil {
179179
return err
180180
}
181-
log.Println("Watchdog and TCM stoped")
181+
log.Println("Watchdog and TCM stopped")
182182
} else {
183183
_, err := process_utils.StopProcess(tcmPidFile)
184184
if err != nil {
185185
return err
186186
}
187-
log.Println("TCM stoped")
187+
log.Println("TCM stopped")
188188
}
189189

190190
return nil

test/integration/tcm/test_tcm.py

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11

2-
<<<<<<< HEAD
3-
from subprocess import PIPE, Popen
4-
=======
52
import os
63
from subprocess import PIPE, STDOUT, Popen, run
7-
>>>>>>> d913784 (tcm: add the tt tcm status command)
84

95
from utils import skip_if_tarantool_ce, wait_for_lines_in_output
106

@@ -66,7 +62,7 @@ def test_tcm_start_success(tt_cmd, tmp_path):
6662

6763
output = wait_for_lines_in_output(stop.stdout, ["TCM"])
6864

69-
assert "TCM stoped" in output.strip()
65+
assert "TCM stopped" in output.strip()
7066
assert tcm.poll() is not None
7167

7268

0 commit comments

Comments
 (0)