def __init__(self, name, log=True): gr = GarbageReport('ObjectReport\'s GarbageReport: %s' % name, log=log) gr.destroy() del gr self._name = name self._pool = ObjectPool(self._getObjectList()) #ExclusiveObjectPool.addExclObjs(self, self._pool, self._name) if log: self.notify.info('===== ObjectReport: \'%s\' =====\n%s' % (self._name, self.typeFreqStr()))
def _runGarbageReport(self, task): self._garbageReport = GarbageReport( 'ScheduledGarbageReport', threaded=True, doneCallback=self._scheduleNextGarbageReport, autoDestroy=True, priority=GarbageReport.Priorities.Normal * 3) return task.done
def _runGarbageReport(self, task): # run a garbage report and schedule the next one after this one finishes # give this job 3 times as many timeslices as normal-priority jobs self._garbageReport = GarbageReport('ScheduledGarbageReport', threaded=True, doneCallback=self._scheduleNextGarbageReport, autoDestroy=True, priority=GarbageReport.Priorities.Normal * 3) return task.done