Skip to content

Commit

Permalink
step2 : extract redis functions to a file
Browse files Browse the repository at this point in the history
  • Loading branch information
jdvr committed Jul 27, 2017
1 parent 7fcbb59 commit 394081d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
13 changes: 2 additions & 11 deletions create-cluster
@@ -1,5 +1,7 @@
#!/bin/bash

source "redis-functions.sh"

# Settings
PORT=30000
TIMEOUT=2000
Expand All @@ -16,17 +18,6 @@ fi

# Computed vars
ENDPORT=$((PORT+NODES))
redis-server() {
../../src/redis-server $@
}

redis-trib() {
../../src/redis-trib.rb $@
}

redis-cli() {
../../src/redis-cli $@
}

start_command() {
while [ $((PORT < ENDPORT)) != "0" ]; do
Expand Down
11 changes: 11 additions & 0 deletions redis-functions.sh
@@ -0,0 +1,11 @@
redis-server() {
../../src/redis-server $@
}

redis-trib() {
../../src/redis-trib.rb $@
}

redis-cli() {
../../src/redis-cli $@
}

0 comments on commit 394081d

Please sign in to comment.