support stopping of optimizations

This commit is contained in:
Romain Bignon 2010-11-11 13:57:14 +01:00
commit 9a8fe8b55e
2 changed files with 10 additions and 7 deletions

View file

@ -36,8 +36,9 @@ class Visibility(Optimization):
return True
def stop(self):
# TODO
return False
self.sched.cancel(self.cron)
self.cron = None
return True
def is_running(self):
return self.cron is not None