summaryrefslogtreecommitdiffstats
path: root/src/main/java/org/openslx/imagemaster/serverconnection/CrcScheduler.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/openslx/imagemaster/serverconnection/CrcScheduler.java')
-rw-r--r--src/main/java/org/openslx/imagemaster/serverconnection/CrcScheduler.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/main/java/org/openslx/imagemaster/serverconnection/CrcScheduler.java b/src/main/java/org/openslx/imagemaster/serverconnection/CrcScheduler.java
index ff1374c..031a807 100644
--- a/src/main/java/org/openslx/imagemaster/serverconnection/CrcScheduler.java
+++ b/src/main/java/org/openslx/imagemaster/serverconnection/CrcScheduler.java
@@ -12,7 +12,7 @@ import org.openslx.imagemaster.crcchecker.CrcChecker;
/**
* Class to schedule CRC checks.
- * CRC checks of uploading images are so done parallel to the connection.
+ * CRC checks of uploading images are so done parallel to the connection.
*/
public class CrcScheduler extends TimerTask
{
@@ -22,9 +22,10 @@ public class CrcScheduler extends TimerTask
@Override
public void run()
{
- log.debug( "Starting checks..." );
List<UploadingImage> list = ImageProcessor.getImagesToCheck();
- log.debug( list );
+ if ( list == null || list.isEmpty() )
+ return;
+ log.debug( "Starting checks: " + list );
Iterator<UploadingImage> iter = list.iterator();
// iterate over the uploading images that need to be checked
while ( iter.hasNext() ) {
@@ -71,7 +72,7 @@ public class CrcScheduler extends TimerTask
Timer timer = new Timer( "CRCScheduler" );
// start now and fire every 60 s
- timer.schedule( new CrcScheduler(), 0, Globals.getCrcSchedulingInterval() * 1000L );
+ timer.schedule( new CrcScheduler(), 0, Globals.getCrcSchedulingInterval() * 1000L );
}
}