From a1377a596271459a3d3100a7e0bc9d70d6c12a84 Mon Sep 17 00:00:00 2001 From: root Date: Sun, 12 Apr 2020 19:19:56 -0400 Subject: [PATCH] test remove instance function --- README.md | 4 ++-- o_manager.py | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6ea6c72..f8a2a7c 100644 --- a/README.md +++ b/README.md @@ -12,8 +12,8 @@ The program needs to run as root. Todos ==== - [x] improve log reading efficiency, potentially using pytailer -- [ ] remove instance or change configuration +- [x] remove instance or change configuration - [ ] improve ui using template, move to ajax - [ ] parameterize inline constants - [ ] refractor code -- [ ] documentations \ No newline at end of file +- [ ] documentations diff --git a/o_manager.py b/o_manager.py index 58312ba..5f866dc 100644 --- a/o_manager.py +++ b/o_manager.py @@ -91,6 +91,8 @@ class OManager: instance["op"].stop() instance["weight"] = 0 self.instances.remove(instance) + if len(self.instances)==0: + self.new_idx = 0 self.reset_lb() def remove_all_op(self):