1.0.42 - Increase album download timeout to 1 hour
Hopefully corrects the issue with large-album-rips from #35
This commit is contained in:
parent
339aa8935d
commit
1aaefcccc8
2
pom.xml
2
pom.xml
@ -4,7 +4,7 @@
|
||||
<groupId>com.rarchives.ripme</groupId>
|
||||
<artifactId>ripme</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<version>1.0.41</version>
|
||||
<version>1.0.42</version>
|
||||
<name>ripme</name>
|
||||
<url>http://rip.rarchives.com</url>
|
||||
<properties>
|
||||
|
@ -1,7 +1,7 @@
|
||||
package com.rarchives.ripme.ripper;
|
||||
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.ThreadPoolExecutor;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
@ -14,7 +14,7 @@ import com.rarchives.ripme.utils.Utils;
|
||||
public class DownloadThreadPool {
|
||||
|
||||
private static final Logger logger = Logger.getLogger(DownloadThreadPool.class);
|
||||
private ExecutorService threadPool = null;
|
||||
private ThreadPoolExecutor threadPool = null;
|
||||
|
||||
public DownloadThreadPool() {
|
||||
initialize("Main");
|
||||
@ -27,7 +27,7 @@ public class DownloadThreadPool {
|
||||
private void initialize(String threadPoolName) {
|
||||
int threads = Utils.getConfigInteger("threads.size", 10);
|
||||
logger.debug("Initializing " + threadPoolName + " thread pool with " + threads + " threads");
|
||||
threadPool = Executors.newFixedThreadPool(threads);
|
||||
threadPool = (ThreadPoolExecutor) Executors.newFixedThreadPool(threads);
|
||||
}
|
||||
|
||||
public void addThread(Thread t) {
|
||||
@ -37,8 +37,7 @@ public class DownloadThreadPool {
|
||||
public void waitForThreads() {
|
||||
threadPool.shutdown();
|
||||
try {
|
||||
// XXX What if some rips take longer than 120 seconds to complete?
|
||||
threadPool.awaitTermination(120, TimeUnit.SECONDS);
|
||||
threadPool.awaitTermination(3600, TimeUnit.SECONDS);
|
||||
} catch (InterruptedException e) {
|
||||
logger.error("[!] Interrupted while waiting for threads to finish: ", e);
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ import com.rarchives.ripme.utils.Utils;
|
||||
public class UpdateUtils {
|
||||
|
||||
private static final Logger logger = Logger.getLogger(UpdateUtils.class);
|
||||
private static final String DEFAULT_VERSION = "1.0.41";
|
||||
private static final String DEFAULT_VERSION = "1.0.42";
|
||||
private static final String updateJsonURL = "http://rarchives.com/ripme.json";
|
||||
private static final String updateJarURL = "http://rarchives.com/ripme.jar";
|
||||
private static final String mainFileName = "ripme.jar";
|
||||
|
Loading…
Reference in New Issue
Block a user