code: def _filter(self, environ, params):
          if self.queries:
              if 'QUERY_STRING' not in environ:
                  return False
              available = set(qstr.partition('=')[0] for qstr in
                              environ['QUERY_STRING'].split('&'))
              required = set(self.queries)
              if not required.issubset(available):
                  return False
          unused = {}
          for key, value in params.items():
              if key not in self.use:
                  unused[key] = value
          for key in unused:
              del params[key]
          try:
              additional = self.filter(environ, params, unused) or {}
          except DeferLimit:
              return False
          key = self.key(params)
          params.update(unused)
          params.update(additional)
          now = time.time()
          self.db.expire(key, 60)
          update_uuid = str(uuid.uuid4())
          update = {
              'uuid': update_uuid,
              'update': {
                  'params': params,
                  'time': now,
              },
          }
          self.db.rpush(key, msgpack.dumps(update))
          records = self.db.lrange(key, 0, -1)
          loader = BucketLoader(self.bucket_class, self.db, self, key, records)
          if 'turnstile.conf' in environ:
              config = environ['turnstile.conf']['compactor']
              try:
                  max_updates = int(config['max_updates'])
              except (KeyError, ValueError):
                  max_updates = None
              try:
                  max_age = int(config['max_age'])
              except (KeyError, ValueError):
                  max_age = 600
              if max_updates and loader.need_summary(now, max_updates, max_age):
                  summarize = dict(summarize=now, uuid=str(uuid.uuid4()))
                  self.db.rpush(key, msgpack.dumps(summarize))
                  compactor_key = config.get('compactor_key', 'compactor')
                  self.db.zadd(compactor_key, int(math.ceil(now)), key)
          self.db.expireat(key, loader.bucket.expire)
          if loader.delay is not None:
              environ.setdefault('turnstile.delay', [])
              environ['turnstile.delay'].append((loader.delay, self,
                                                 loader.bucket))
          set_name = environ.get('turnstile.bucket_set')
          if set_name:
              self.db.zadd(set_name, loader.bucket.expire, key)
          return not self.continue_scan