support for 'panic' interactive command
This commit is contained in:
parent
62b8a897e3
commit
f0b012b238
@ -666,6 +666,7 @@ max-load=<load> # Set a new set of max-load thresholds
|
|||||||
throttle-query=<query> # Set a new throttle-query
|
throttle-query=<query> # Set a new throttle-query
|
||||||
throttle # Force throttling
|
throttle # Force throttling
|
||||||
no-throttle # End forced throttling (other throttling may still apply)
|
no-throttle # End forced throttling (other throttling may still apply)
|
||||||
|
panic # panic and quit without cleanup
|
||||||
help # This message
|
help # This message
|
||||||
`)
|
`)
|
||||||
}
|
}
|
||||||
@ -710,6 +711,12 @@ help # This message
|
|||||||
{
|
{
|
||||||
atomic.StoreInt64(&this.migrationContext.ThrottleCommandedByUser, 0)
|
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:
|
default:
|
||||||
err = fmt.Errorf("Unknown command: %s", command)
|
err = fmt.Errorf("Unknown command: %s", command)
|
||||||
fmt.Fprintf(writer, "%s\n", err.Error())
|
fmt.Fprintf(writer, "%s\n", err.Error())
|
||||||
|
Loading…
Reference in New Issue
Block a user