# HG changeset patch # User Ingo Weinzierl # Date 1317123225 0 # Node ID 74142aa5d938faaa3c66c6c368738c173534e988 # Parent d1d6fd8cfbb2b25e3448a8dbda5986c9ccb215f7 Improved WSPLGEN start to suppress inconsistent Artifact states. flys-artifacts/trunk@2836 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r d1d6fd8cfbb2 -r 74142aa5d938 flys-artifacts/ChangeLog --- a/flys-artifacts/ChangeLog Tue Sep 27 10:53:41 2011 +0000 +++ b/flys-artifacts/ChangeLog Tue Sep 27 11:33:45 2011 +0000 @@ -1,3 +1,13 @@ +2011-09-27 Ingo Weinzierl + + * src/main/java/de/intevation/flys/artifacts/states/FloodMapState.java: + Put Artifact in background mode first before starting WSPLGEN, otherwise + a very fast errors (call CallContext.afterBackground() before Artifact is + in Background mode) might lead to an inconsistent state. + + * src/main/java/de/intevation/flys/wsplgen/ProblemObserver.java: Repaired + broken error num parsing. + 2011-09-27 Ingo Weinzierl * src/main/java/de/intevation/flys/wsplgen/ProblemObserver.java: Track diff -r d1d6fd8cfbb2 -r 74142aa5d938 flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/FloodMapState.java --- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/FloodMapState.java Tue Sep 27 10:53:41 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/FloodMapState.java Tue Sep 27 11:33:45 2011 +0000 @@ -252,9 +252,6 @@ return null; } - Scheduler scheduler = Scheduler.getInstance(); - scheduler.addJob(job); - facetCreator.createWSPLGENFacet(); facets.addAll(facetCreator.getFacets()); @@ -269,6 +266,9 @@ "wsplgen.job.queued") )); + Scheduler scheduler = Scheduler.getInstance(); + scheduler.addJob(job); + return null; } diff -r d1d6fd8cfbb2 -r 74142aa5d938 flys-artifacts/src/main/java/de/intevation/flys/wsplgen/ProblemObserver.java --- a/flys-artifacts/src/main/java/de/intevation/flys/wsplgen/ProblemObserver.java Tue Sep 27 10:53:41 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/wsplgen/ProblemObserver.java Tue Sep 27 11:33:45 2011 +0000 @@ -63,7 +63,7 @@ Matcher startError = WSPLGEN_ERROR_START.matcher(log); if (startError.matches()) { if (startError.groupCount() >= 2) { - String tmp = startError.group(2); + String tmp = startError.group(3); if (tmp != null && tmp.length() > 0) { error = Integer.parseInt(tmp);