Restart command
This commit is contained in:
@@ -38,6 +38,7 @@ impl Engine {
|
|||||||
("preset list", "List available presets"),
|
("preset list", "List available presets"),
|
||||||
("preset use <name>", "Switch active preset"),
|
("preset use <name>", "Switch active preset"),
|
||||||
("strategy start", "Start strategy runtime"),
|
("strategy start", "Start strategy runtime"),
|
||||||
|
("strategy restart", "Restart strategy runtime"),
|
||||||
("strategy set <id>", "Change active strategy"),
|
("strategy set <id>", "Change active strategy"),
|
||||||
("strategy <command>", "Send command to strategy runtime"),
|
("strategy <command>", "Send command to strategy runtime"),
|
||||||
];
|
];
|
||||||
@@ -236,6 +237,12 @@ impl Engine {
|
|||||||
match strategy_command {
|
match strategy_command {
|
||||||
"start" => {}
|
"start" => {}
|
||||||
|
|
||||||
|
"restart" => {
|
||||||
|
self.strategy_engine
|
||||||
|
.reload(&self.config.lock().await.get_ref()?.strategy)
|
||||||
|
.await?;
|
||||||
|
}
|
||||||
|
|
||||||
"set" => {
|
"set" => {
|
||||||
set_cfg!(id);
|
set_cfg!(id);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user