Skip to content

Commit

Permalink
Fix slave's log directory (#220)
Browse files Browse the repository at this point in the history
* typo

* fix missing cwd for slaves
  • Loading branch information
GuyAv46 authored Feb 13, 2024
1 parent da43a25 commit f60d46e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion RLTest/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ def do_normal_conn(self, line):

parser.add_argument(
'--clear-logs', action='store_const', const=True, default=False,
help='deleting the log direcotry before the execution')
help='deleting the log directory before the execution')

parser.add_argument(
'--log-dir', default='./logs',
Expand Down
5 changes: 3 additions & 2 deletions RLTest/redis_std.py
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,8 @@ def startEnv(self, masters = True, slaves = True):
if self.useSlaves and slaves and self.slaveProcess is None:
if self.verbose:
print(Colors.Green("Redis slave command: " + ' '.join(self.slaveCmdArgs)))
self.slaveProcess = subprocess.Popen(args=self.slaveCmdArgs, env=self.slaveOSEnv, **options)
self.slaveProcess = subprocess.Popen(args=self.slaveCmdArgs, env=self.slaveOSEnv, cwd=self.dbDirPath,
**options)
time.sleep(0.1)
if self._isAlive(self.slaveProcess):
con = self.getSlaveConnection()
Expand Down Expand Up @@ -427,7 +428,7 @@ def _segfault(self, role, retries=3):
else:
return
print(Colors.Bred('Failed killing processes with sigkill.'))

def stopEnvWithSegFault(self, masters = True, slaves = True):
if self.masterProcess is not None and masters is True:
self._segfault(MASTER)
Expand Down

0 comments on commit f60d46e

Please sign in to comment.