mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
more threads
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -13,3 +13,4 @@ deployments/ROOT.war
|
|||||||
.classpath
|
.classpath
|
||||||
.settings
|
.settings
|
||||||
.factorypath
|
.factorypath
|
||||||
|
/target
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ public class StartupBean {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 3 threads
|
// 3 threads
|
||||||
for (int i = 0; i < 3; i++) {
|
for (int i = 0; i < 6; i++) {
|
||||||
worker.start();
|
worker.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -54,10 +54,10 @@ public class FeedRefreshWorker {
|
|||||||
try {
|
try {
|
||||||
Feed feed = getNextFeed();
|
Feed feed = getNextFeed();
|
||||||
if (feed != null) {
|
if (feed != null) {
|
||||||
System.out.println("refreshing " + feed.getUrl());
|
log.debug("refreshing " + feed.getUrl());
|
||||||
update(feed);
|
update(feed);
|
||||||
} else {
|
} else {
|
||||||
System.out.println("sleeping");
|
log.debug("sleeping");
|
||||||
Thread.sleep(15000);
|
Thread.sleep(15000);
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
@@ -79,7 +79,6 @@ public class FeedRefreshWorker {
|
|||||||
try {
|
try {
|
||||||
fetchedFeed = fetcher.fetch(feed.getUrl());
|
fetchedFeed = fetcher.fetch(feed.getUrl());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
|
||||||
message = "Unable to refresh feed " + feed.getUrl() + " : "
|
message = "Unable to refresh feed " + feed.getUrl() + " : "
|
||||||
+ e.getMessage();
|
+ e.getMessage();
|
||||||
log.info(e.getClass().getName() + " " + message);
|
log.info(e.getClass().getName() + " " + message);
|
||||||
|
|||||||
Reference in New Issue
Block a user