Skip to content

Commit

Permalink
Clear job queue when reloading
Browse files Browse the repository at this point in the history
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?
  • Loading branch information
embolalia committed Aug 29, 2015
1 parent 783cb94 commit 5175660
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sopel/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 5175660

Please sign in to comment.