labs-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simo...@apache.org
Subject svn commit: r1041864 - /labs/magma/trunk/jobs-simple/src/main/java/org/apache/magma/jobs/simple/SimpleScheduler.java
Date Fri, 03 Dec 2010 15:20:14 GMT
Author: simoneg
Date: Fri Dec  3 15:20:13 2010
New Revision: 1041864

URL: http://svn.apache.org/viewvc?rev=1041864&view=rev
Log:
Don't schedule concurrent multiple runs for same job

Modified:
    labs/magma/trunk/jobs-simple/src/main/java/org/apache/magma/jobs/simple/SimpleScheduler.java

Modified: labs/magma/trunk/jobs-simple/src/main/java/org/apache/magma/jobs/simple/SimpleScheduler.java
URL: http://svn.apache.org/viewvc/labs/magma/trunk/jobs-simple/src/main/java/org/apache/magma/jobs/simple/SimpleScheduler.java?rev=1041864&r1=1041863&r2=1041864&view=diff
==============================================================================
--- labs/magma/trunk/jobs-simple/src/main/java/org/apache/magma/jobs/simple/SimpleScheduler.java
(original)
+++ labs/magma/trunk/jobs-simple/src/main/java/org/apache/magma/jobs/simple/SimpleScheduler.java
Fri Dec  3 15:20:13 2010
@@ -104,6 +104,7 @@ public class SimpleScheduler extends Sch
 		long min = cur + 60000;
 		synchronized (datas) {
 			for (JobData data : this.datas) {
+				if (data.isRunning()) continue;
 				if (data.getNextExecutionTime() <= cur) {
 					if (this.running.size() > maxThreads) {
 						min = cur + 1000;



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@labs.apache.org
For additional commands, e-mail: commits-help@labs.apache.org


Mime
View raw message