Skip to content

Commit

Permalink
Fix Redis startup failure (PlaytikaOSS#737)
Browse files Browse the repository at this point in the history
  • Loading branch information
Anastasiia Smirnova committed Oct 7, 2021
1 parent a364fe1 commit 1d7d428
Showing 1 changed file with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,14 @@ public class RedisStatusCheck extends AbstractCommandWaitStrategy {

@Override
public String[] getCheckCommand() {
return new String[] {
"redis-cli", "-a", "$REDIS_PASSWORD", "-p", String.valueOf(properties.getPort()), "ping"
};
if (properties.isRequirepass()) {
return new String[]{
"redis-cli", "-a", properties.getPassword(), "-p", String.valueOf(properties.getPort()), "ping"
};
} else {
return new String[]{
"redis-cli", "-p", String.valueOf(properties.getPort()), "ping"
};
}
}
}

0 comments on commit 1d7d428

Please sign in to comment.