Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#133]: Fix incorrect Redis port configuration in count-atoms connection. #134

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
[#119] Correct misleading message in das-cli faas update-version to accurately reflect the latest version. (PR: #121)
[#125] Add commands for managing the client and server of the database wrapper (PR: #126)
[#122] Add a das-cli command to print the total number of atoms in the AtomDB (PR: #131)
[#133] Changed Redis connection configuration for count-atoms to use the correct port from config file (PR: #134)
4 changes: 3 additions & 1 deletion src/commands/db/redis_container_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ def __init__(
)

super().__init__(container, exec_context)
self._options = options

def start_container(
self,
Expand Down Expand Up @@ -78,7 +79,8 @@ def start_cluster(self, redis_nodes: List[Dict], redis_port: AnyStr):
return container_id

def get_count_keys(self) -> dict:
command = "sh -c \"redis-cli KEYS '*' | cut -d ' ' -f2\""
redis_port = self._options.get('redis_port')
command = f"sh -c \"redis-cli -p {redis_port} KEYS '*' | cut -d ' ' -f2\""

result = self._exec_container(command)

Expand Down