Restart command

This commit is contained in:
2026-08-02 07:07:13 +02:00
parent c7fb587cbb
commit 6dfd142d3c
+7
View File
@@ -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);