From b414ade01d8e82d7db22502f2bc621cbc720bc3c Mon Sep 17 00:00:00 2001 From: Embolalia Date: Sat, 29 Aug 2015 11:21:01 -0400 Subject: [PATCH] Clear job queue when reloading Just a stop-gap to make #831 not a regression so 6.0 can get out the door. It's not the right solution, but it's slightly better than what was there before. Only reloading a module with a job actually in it will kill all the jobs now, rather than any module. So, progress? --- sopel/bot.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sopel/bot.py b/sopel/bot.py index edb0040452..b0d13331cc 100644 --- a/sopel/bot.py +++ b/sopel/bot.py @@ -162,7 +162,9 @@ def unregister(self, obj): for rule in obj.rule: self._callables[obj.priority][rule].remove(obj) if hasattr(obj, 'interval'): - pass # TODO + # TODO this should somehow find the right job to remove, rather than + # clearing the entire queue. Issue #831 + self.scheduler.clear_jobs() if getattr(obj, '__name__', None) == 'shutdown': self.shutdown_methods.remove(obj)