Skip to content

Commit f5a5d52

Browse files
authored
Add credentials
1 parent 7f53e19 commit f5a5d52

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

worker/src/main/java/worker/Worker.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ static void updateVote(Connection dbConn, String voterID, String vote) throws SQ
4747

4848
static Jedis connectToRedis(String host) {
4949
Jedis conn = new Jedis(host);
50+
conn.auth("redis_password")
5051

5152
while (true) {
5253
try {
@@ -68,7 +69,7 @@ static Connection connectToDB(String host) throws SQLException {
6869
try {
6970

7071
Class.forName("org.postgresql.Driver");
71-
String url = "jdbc:postgresql://" + host + "/postgres";
72+
String url = "jdbc:postgresql://" + host + "/postgres?user=postgres_user&password=postgres_password";
7273

7374
while (conn == null) {
7475
try {

0 commit comments

Comments
 (0)