say "interrupt" nicely instead of a stack trace on ^C
authorTom Clegg <tom@clinicalfuture.com>
Thu, 18 Jul 2013 21:31:08 +0000 (17:31 -0400)
committerTom Clegg <tom@clinicalfuture.com>
Thu, 18 Jul 2013 21:31:08 +0000 (17:31 -0400)
sdk/cli/bin/arv-run-pipeline-instance

index 94030934e89f4ddd01a6652abfc19be6f26e9e74..e36ac0f0318061ed1ac1ca3943910b8d1a12fa1e 100755 (executable)
@@ -483,7 +483,14 @@ class WhRunPipelineInstance
       @instance[:components] = @components
       @instance[:active] = moretodo
       report_status
-      sleep 10 if moretodo
+      if moretodo
+        begin
+          sleep 10
+        rescue Interrupt
+          debuglog "interrupt", 0
+          abort
+        end
+      end
     end
     @instance[:success] = @components.reject { |cname,c| c[:job] and c[:job][:success] }.empty?
     @instance.save