Get the configured backends and the intervals for any backend which
        supports them, and set up the update "buckets". There will be one
        bucket for each thing being updated at a given interval.

def fill_buckets(self):
        '''
        Get the configured backends and the intervals for any backend which
        supports them, and set up the update "buckets". There will be one
        bucket for each thing being updated at a given interval.
        '''
        update_intervals = self.fileserver.update_intervals()
        self.buckets = {}
        for backend in self.fileserver.backends():
            fstr = '{0}.update'.format(backend)
            try:
                update_func = self.fileserver.servers[fstr]
            except KeyError:
                log.debug(
                    'No update function for the %s filserver backend',
                    backend
                )
                continue
            if backend in update_intervals:
                # Variable intervals are supported for this backend
                for id_, interval in six.iteritems(update_intervals[backend]):
                    if not interval:
                        # Don't allow an interval of 0
                        interval = DEFAULT_INTERVAL
                        log.debug(
                            'An update_interval of 0 is not supported, '
                            'falling back to %s', interval
                        )
                    i_ptr = self.buckets.setdefault(interval, OrderedDict())
                    # Backend doesn't technically need to be present in the
                    # key, all we *really* need is the function reference, but
                    # having it there makes it easier to provide meaningful
                    # debug logging in the update threads.
                    i_ptr.setdefault((backend, update_func), []).append(id_)
            else:
                # Variable intervals are not supported for this backend, so
                # fall back to the global interval for that fileserver. Since
                # this backend doesn't support variable updates, we have
                # nothing to pass to the backend's update func, so we'll just
                # set the value to None.
                try:
                    interval_key = '{0}_update_interval'.format(backend)
                    interval = self.opts[interval_key]
                except KeyError:
                    interval = DEFAULT_INTERVAL
                    log.warning(
                        '%s key missing from configuration. Falling back to '
                        'default interval of %d seconds',
                        interval_key, interval
                    )
                self.buckets.setdefault(
                    interval, OrderedDict())[(backend, update_func)] = None