Message "script failed" moved to the correct place in the code

GSA-719 fixed
This commit is contained in:
Tad Jordan 2013-02-04 13:40:40 -05:00
parent 79ef41e7b1
commit eb847fa102
1 changed files with 3 additions and 2 deletions

View File

@ -113,6 +113,7 @@ class QCommandLine extends CommandLineProgram with Logging {
def execute = { def execute = {
var success = false var success = false
var result = 1 var result = 1
var functionsAndStatusSize = 0
try { try {
ClassFieldCache.parsingEngine = this.parser ClassFieldCache.parsingEngine = this.parser
@ -176,8 +177,7 @@ class QCommandLine extends CommandLineProgram with Logging {
val scriptFunctions = functionsAndStatus.filterKeys(f => script.functions.contains(f)) val scriptFunctions = functionsAndStatus.filterKeys(f => script.functions.contains(f))
script.onExecutionDone(scriptFunctions, success) script.onExecutionDone(scriptFunctions, success)
} }
functionsAndStatusSize = functionsAndStatus.size
logger.info("Script %s with %d total jobs".format(if (success) "completed successfully" else "failed", functionsAndStatus.size))
// write the final complete job report // write the final complete job report
logger.info("Writing final jobs report...") logger.info("Writing final jobs report...")
@ -207,6 +207,7 @@ class QCommandLine extends CommandLineProgram with Logging {
} }
} }
} }
logger.info("Script %s with %d total jobs".format(if (success) "completed successfully" else "failed", functionsAndStatusSize))
result result
} }