Skip to content
Snippets Groups Projects
Unverified Commit 8f8fa127 authored by Richard Alam's avatar Richard Alam Committed by GitHub
Browse files

Merge pull request #6312 from tdjac0bs/tdjac0bs-patch-slide-timeout

Fixes presentation slide conversion timeout
parents 2e0660db 03cd3e42
No related branches found
No related tags found
No related merge requests found
......@@ -54,14 +54,12 @@ public class PdfToSwfSlidesGenerationService {
private TextFileCreator textFileCreator;
private SvgImageCreator svgImageCreator;
private long MAX_CONVERSION_TIME = 5 * 60 * 1000L;
private long MAX_CONVERSION_TIME = 5 * 60 * 1000L * 1000L;
private String BLANK_SLIDE;
private int MAX_SWF_FILE_SIZE;
private boolean svgImagesRequired;
private boolean generatePngs;
private static final long CONVERSION_TIMEOUT = 20000000000L; // 20s
public PdfToSwfSlidesGenerationService(int numConversionThreads) {
executor = Executors.newFixedThreadPool(numConversionThreads);
}
......@@ -194,7 +192,7 @@ public class PdfToSwfSlidesGenerationService {
};
Future<PdfToSwfSlide> f = executor.submit(c);
long endNanos = System.nanoTime() + CONVERSION_TIMEOUT;
long endNanos = System.nanoTime() + MAX_CONVERSION_TIME;
try {
// Only wait for the remaining time budget
long timeLeft = endNanos - System.nanoTime();
......@@ -346,7 +344,7 @@ public class PdfToSwfSlidesGenerationService {
}
public void setMaxConversionTime(int minutes) {
MAX_CONVERSION_TIME = minutes * 60 * 1000L;
MAX_CONVERSION_TIME = minutes * 60 * 1000L * 1000L;
}
public void setSwfSlidesGenerationProgressNotifier(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment