Merge branch 'master' of ssh://gsa1/humgen/gsa-scr1/gsa-engineering/git/unstable

This commit is contained in:
Mark DePristo 2011-09-27 07:10:58 -04:00
commit 17dc0e44bc
2 changed files with 8 additions and 7 deletions

View File

@ -29,7 +29,7 @@
<!-- Core walkers --> <!-- Core walkers -->
<package name="org.broadinstitute.sting.gatk.walkers.**" /> <package name="org.broadinstitute.sting.gatk.walkers.**" />
<!-- All non-oneoff GATK-specific RODs --> <!-- All non-oneoff GATK-specific RODs -->
<package name="org.broadinstitute.sting.gatk.refdata.**" /> <package name="org.broadinstitute.sting.utils.codecs.**" />
<!-- Filters --> <!-- Filters -->
<package name="org.broadinstitute.sting.gatk.filters" /> <package name="org.broadinstitute.sting.gatk.filters" />
<!-- Tribble codecs --> <!-- Tribble codecs -->

View File

@ -37,7 +37,7 @@ import org.broadinstitute.sting.utils.exceptions.UserException
/** /**
* Entry point of Queue. Compiles and runs QScripts passed in to the command line. * Entry point of Queue. Compiles and runs QScripts passed in to the command line.
*/ */
object QCommandLine { object QCommandLine extends Logging {
/** /**
* Main. * Main.
* @param argv Arguments. * @param argv Arguments.
@ -45,22 +45,23 @@ object QCommandLine {
def main(argv: Array[String]) { def main(argv: Array[String]) {
val qCommandLine = new QCommandLine val qCommandLine = new QCommandLine
Runtime.getRuntime.addShutdownHook(new Thread { val shutdownHook = new Thread {
/** Cleanup as the JVM shuts down. */
override def run() { override def run() {
logger.info("Shutting down jobs. Please wait...")
ProcessController.shutdown() ProcessController.shutdown()
qCommandLine.shutdown() qCommandLine.shutdown()
} }
}) }
Runtime.getRuntime.addShutdownHook(shutdownHook)
try { try {
CommandLineProgram.start(qCommandLine, argv); CommandLineProgram.start(qCommandLine, argv);
Runtime.getRuntime.removeShutdownHook(shutdownHook)
if (CommandLineProgram.result != 0) if (CommandLineProgram.result != 0)
System.exit(CommandLineProgram.result); System.exit(CommandLineProgram.result);
} catch { } catch {
case e: Exception => CommandLineProgram.exitSystemWithError(e) case e: Exception => CommandLineProgram.exitSystemWithError(e)
} finally {
} }
} }
} }