diff options
Diffstat (limited to 'wasp/wasp.py')
| -rw-r--r-- | wasp/wasp.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/wasp/wasp.py b/wasp/wasp.py index 7f4d0d4..7cf2883 100644 --- a/wasp/wasp.py +++ b/wasp/wasp.py @@ -441,12 +441,17 @@ class Manager(): normal execution context meaning any exceptions and other problems can be observed interactively via the console. """ + global free + if self._scheduling: print('Watch already running in the background') return if not self.app: self.switch(self.quick_ring[0]) + if watch.free: + gc.collect() + free = gc.mem_free() # Reminder: wasptool uses this string to confirm the device has # been set running again. @@ -494,8 +499,13 @@ class Manager(): def schedule(self, enable=True): """Run the system manager synchronously.""" + global free + if not self.app: self.switch(self.quick_ring[0]) + if watch.free: + gc.collect() + free = gc.mem_free() if enable: watch.schedule = self._schedule |
