'Changes the tracker selection interval dynamically and schedules the task.'

def _reschedule_tracker_select(self):

    num_torrents = self._torrent_db.getNumberCollectedTorrents()
    tracker_select_interval = (min(max((7200 / num_torrents), 10), 100) if num_torrents else DEFAULT_TORRENT_SELECTION_INTERVAL)
    self._logger.debug(u'tracker    selection    interval    changed    to    %s', tracker_select_interval)
    self.register_task(u'torrent_checker_tracker_selection', reactor.callLater(tracker_select_interval, self._task_select_tracker))
