Skip to content
This repository has been archived by the owner on Sep 13, 2020. It is now read-only.

Commit

Permalink
Fix redis connection issue (#17)
Browse files Browse the repository at this point in the history
Fix redis connection issue:
* Update tweetsched.properties
* Increase timeout value
* Update log4j2.xml
  • Loading branch information
Gleb Kosteiko authored Aug 17, 2018
1 parent 3b4c193 commit dbbca6b
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 13 deletions.
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@ Cron jobs service for the Scheduled Tweets service.

## How to run locally:
- Configure next app properties in "tweetsched.properties" file:
- CRON_EXPRESSION (optional)
- REDIS_URL
- REDIS_PORT
- REDIS_PASSWORD
- PUBLISHER_URL
- cron-expression (optional)
- redis-url
- redis-port
- redis-password
- publisher-url
- publisher-token
- publisher-secret
- Copy "tweetsched.properties" file to folder with jar file
- Run `java -jar build/libs/tweetsched-cron-1.<<<desired_number_of_build>>>.jar`
6 changes: 3 additions & 3 deletions config/tweetsched.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
redis-password=
redis-port=
redis-url=
redis-port=
redis-password=
publisher-url=
publisher-token==
publisher-token=
publisher-secret=
cron-expression=0 0 1-3 * * *
2 changes: 1 addition & 1 deletion src/main/java/gk/tweetsched/cron/service/QueueService.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ private void init() {
new JedisPoolConfig(),
propService.getProp(REDIS_URL),
Integer.valueOf(propService.getProp(REDIS_PORT)),
Protocol.DEFAULT_TIMEOUT,
Protocol.DEFAULT_TIMEOUT * 10,
propService.getProp(REDIS_PASSWORD));
}

Expand Down
5 changes: 1 addition & 4 deletions src/main/resources/log4j2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,12 @@
<Appender type="Console" name="Console">
<Layout type="PatternLayout" pattern="%d %p %C{1.} %m%n" />
</Appender>
<Appender type="Console" name="FLOW">
<Layout type="PatternLayout" pattern="%C{1}.%M %m %ex%n" />
</Appender>
<Appender type="File" name="File" fileName="${filename}">
<Layout type="PatternLayout" pattern="%d %p %C{1.} %m%n" />
</Appender>
</Appenders>
<Loggers>
<Root level="debug">
<Root level="info">
<AppenderRef ref="File" />
<AppenderRef ref="Console" />
</Root>
Expand Down

0 comments on commit dbbca6b

Please sign in to comment.