diff options
Diffstat (limited to 'daemon')
-rw-r--r-- | daemon/src/main/java/org/openslx/taskmanager/main/Taskmanager.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/daemon/src/main/java/org/openslx/taskmanager/main/Taskmanager.java b/daemon/src/main/java/org/openslx/taskmanager/main/Taskmanager.java index b4df03d..8e55e14 100644 --- a/daemon/src/main/java/org/openslx/taskmanager/main/Taskmanager.java +++ b/daemon/src/main/java/org/openslx/taskmanager/main/Taskmanager.java @@ -98,7 +98,7 @@ public class Taskmanager implements FinishCallback, Runnable try { taskInstance = gson.fromJson( jsonData, taskClass ); } catch ( JsonSyntaxException e ) { - log.warn( "Invocation request for " + task + " with invalid json: " + jsonData ); + log.warn( "Invocation request for " + task + " with invalid json: " + jsonData, e ); return TaskStatus.ts_jsonError; } if ( taskInstance == null ) { @@ -111,7 +111,8 @@ public class Taskmanager implements FinishCallback, Runnable } // Now check for id collision synchronized ( instances ) { - if ( instances.containsKey( taskInstance.getId() ) ) { + AbstractTask existing = instances.get( taskInstance.getId() ); + if ( existing != null && !existing.isFinished() ) { log.info( "Ignoring task invocation of " + task + ": Duplicate ID: " + taskInstance.getId() ); return TaskStatus.ts_duplicateId; } |