def on_finish(self, exc=None):
        """Used to initiate the garbage collection"""
        super(GarbageCollector, self).on_finish(exc)
        self._cycles_left -= 1
        if self._cycles_left <= 0:
            num_collected = gc.collect()
            self._cycles_left = self.collection_cycle
            LOGGER.debug('garbage collection run, %d objects evicted',
                         num_collected)
def on_finish ( self , exc = None ) : super ( GarbageCollector , self ) . on_finish ( exc ) self . _cycles_left -= 1 if self . _cycles_left <= 0 : num_collected = gc . collect ( ) self . _cycles_left = self . collection_cycle LOGGER . debug ( 'garbage collection run, %d objects evicted' , num_collected )
Used to initiate the garbage collection