Author: bfoster
Date: Thu Jan 20 23:28:41 2011
New Revision: 1061568
URL: http://svn.apache.org/viewvc?rev=1061568&view=rev
Log:
- ability to map certain task types to certain runners . . . allows conditions
and simpleTasks and the such to say be run locally instead of being sent to
resource manager
Modified:
oodt/branches/wengine-branch/wengine/src/main/java/org/apache/oodt/cas/workflow/engine/WorkflowEngineLocal.java
Modified:
oodt/branches/wengine-branch/wengine/src/main/java/org/apache/oodt/cas/workflow/engine/WorkflowEngineLocal.java
URL:
http://svn.apache.org/viewvc/oodt/branches/wengine-branch/wengine/src/main/java/org/apache/oodt/cas/workflow/engine/WorkflowEngineLocal.java?rev=1061568&r1=1061567&r2=1061568&view=diff
==============================================================================
---
oodt/branches/wengine-branch/wengine/src/main/java/org/apache/oodt/cas/workflow/engine/WorkflowEngineLocal.java
(original)
+++
oodt/branches/wengine-branch/wengine/src/main/java/org/apache/oodt/cas/workflow/engine/WorkflowEngineLocal.java
Thu Jan 20 23:28:41 2011
@@ -124,13 +124,16 @@ public class WorkflowEngineLocal impleme
// Task RUNNER thread
runnerThread = new Thread(new Runnable() {
public void run() {
+ TaskInstance nextTask = null;
while(allowRunnerToWork) {
- TaskInstance nextTask = null;
try {
- while (!pauseRunner &&
allowRunnerToWork && WorkflowEngineLocal.this.runner.hasOpenSlots() &&
(nextTask = WorkflowEngineLocal.this.queueManager.getNext()) != null) {
+ if (nextTask == null)
+ nextTask =
WorkflowEngineLocal.this.queueManager.getNext();
+ while (!pauseRunner &&
allowRunnerToWork && nextTask != null &&
WorkflowEngineLocal.this.runner.hasOpenSlots(nextTask)) {
nextTask.setNotifyEngine(WorkflowEngineLocal.this.weClient);
WorkflowEngineLocal.this.runner.execute(nextTask);
-
+ nextTask =
WorkflowEngineLocal.this.queueManager.getNext();
+
//take a breather
try {
synchronized(this) {
@@ -154,7 +157,6 @@ public class WorkflowEngineLocal impleme
}catch (Exception e){}
}
}
-
});
if (!debug)
runnerThread.start();