|
From: <ha...@us...> - 2007-09-27 16:54:16
|
Revision: 1761
http://cogkit.svn.sourceforge.net/cogkit/?rev=1761&view=rev
Author: hategan
Date: 2007-09-27 09:54:10 -0700 (Thu, 27 Sep 2007)
Log Message:
-----------
set identity on both scheduled and unscheduled tasks
Modified Paths:
--------------
trunk/current/src/cog/modules/karajan/src/org/globus/cog/karajan/workflow/nodes/grid/AbstractGridNode.java
Modified: trunk/current/src/cog/modules/karajan/src/org/globus/cog/karajan/workflow/nodes/grid/AbstractGridNode.java
===================================================================
--- trunk/current/src/cog/modules/karajan/src/org/globus/cog/karajan/workflow/nodes/grid/AbstractGridNode.java 2007-09-27 00:12:38 UTC (rev 1760)
+++ trunk/current/src/cog/modules/karajan/src/org/globus/cog/karajan/workflow/nodes/grid/AbstractGridNode.java 2007-09-27 16:54:10 UTC (rev 1761)
@@ -187,8 +187,10 @@
}
}
}
+
public void submitUnscheduled(TaskHandler handler, Task task, VariableStack stack)
throws ExecutionException {
+ setTaskIdentity(stack, task);
task.addStatusListener(this);
stack.setVar(HANDLER, handler);
synchronized (tasks) {
@@ -210,14 +212,10 @@
}
}
}
+
public void submitScheduled(Scheduler scheduler, Task task, VariableStack stack,
Object constraints) {
- try {
- task.setIdentity(new IdentityImpl(ThreadingContext.get(stack).toString()));
- }
- catch (VariableNotFoundException e) {
- // such is life
- }
+ setTaskIdentity(stack, task);
if (logger.isDebugEnabled()) {
logger.debug(task);
logger.debug("Submitting task " + task.getIdentity());
@@ -228,6 +226,15 @@
}
scheduler.enqueue(task, constraints);
}
+
+ protected void setTaskIdentity(VariableStack stack, Task task) {
+ try {
+ task.setIdentity(new IdentityImpl(ThreadingContext.get(stack).toString()));
+ }
+ catch (VariableNotFoundException e) {
+ // such is life
+ }
+ }
public void statusChanged(StatusEvent e) {
try {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|