Merge pull request #357 from dpkp/del_consumer_stop
Stop consumers on delete
This commit is contained in:
		| @@ -143,6 +143,9 @@ class Consumer(object): | |||||||
|         if self.count_since_commit >= self.auto_commit_every_n: |         if self.count_since_commit >= self.auto_commit_every_n: | ||||||
|             self.commit() |             self.commit() | ||||||
|  |  | ||||||
|  |     def __del__(self): | ||||||
|  |         self.stop() | ||||||
|  |  | ||||||
|     def stop(self): |     def stop(self): | ||||||
|         if self.commit_timer is not None: |         if self.commit_timer is not None: | ||||||
|             self.commit_timer.stop() |             self.commit_timer.stop() | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Dana Powers
					Dana Powers