support for 'panic' interactive command

This commit is contained in:
Shlomi Noach 2016-06-20 06:38:29 +02:00
parent 62b8a897e3
commit f0b012b238

View File

@ -666,6 +666,7 @@ max-load=<load> # Set a new set of max-load thresholds
throttle-query=<query> # Set a new throttle-query
throttle # Force throttling
no-throttle # End forced throttling (other throttling may still apply)
panic # panic and quit without cleanup
help # This message
`)
}
@ -710,6 +711,12 @@ help # This message
{
atomic.StoreInt64(&this.migrationContext.ThrottleCommandedByUser, 0)
}
case "panic":
{
err := fmt.Errorf("User commanded 'panic'. I will now panic, without cleanup. PANIC!")
fmt.Fprintf(writer, "%s\n", err.Error())
this.panicAbort <- err
}
default:
err = fmt.Errorf("Unknown command: %s", command)
fmt.Fprintf(writer, "%s\n", err.Error())