def stop(self):
"""
Cleanup our LoopingCall and any outstanding deferreds...
"""
self.stopping = True
# Cancel any outstanding request to our client
if self._batch_send_d:
self._batch_send_d.cancel()
# Do we have to worry about our looping call?
if self.batch_every_t is not None:
# Stop our looping call, and wait for the deferred to be called
if self.sendLooper is not None:
self.sendLooper.stop()
# Make sure requests that wasn't cancelled above are now
self._cancel_outstanding()
# # Private Methods # #
评论列表
文章目录