Checks the redis blacklist for crawls that should not be propagated
        either from expiring or stopped
        @return: True if the appid crawlid combo is blacklisted
161313
def is_blacklisted(self, appid, crawlid):
        '''
        
        '''
        key_check = '{appid}||{crawlid}'.format(appid=appid,
                                                crawlid=crawlid)
        redis_key = self.spider.name + ":blacklist"
        return self.redis_conn.sismember(redis_key, key_check)
699636
public synchronized static boolean isBlacklisted(String ip) {
    if (blacklistCache == null || blacklistCache.isEmpty()) {
      blacklistCache = new HashSet<>();

      for (IBlackListProvider provider : BLACKLIST_PROVIDERS) {
        try {
          blacklistCache.addAll(provider.getIPs());
        } catch (IOException e) {
          LOGGER.warn("Error fetching blacklist records", e);
        }
      }

    }
    
    return blacklistCache.contains(ip);
  }
1021937
def is_exhausted(self):
        
        retry_counts = (self.total, self.connect, self.read, self.redirect, self.status)
        retry_counts = list(filter(None, retry_counts))
        if not retry_counts:
            return False

        return min(retry_counts) < 0
610555
def autodiscover(blacklist=[]):
    
    import imp
    from django.conf import settings
    try:
        from importlib import import_module
    except ImportError:
        # Django < 1.9 and Python < 2.7
        from django.utils.importlib import import_module

    blacklist.append('admin_tools.dashboard')
    blacklist.append('admin_tools.menu')
    blacklist.append('admin_tools.theming')

    for app in settings.INSTALLED_APPS:
        # skip blacklisted apps
        if app in blacklist:
            continue

        # try to import the app
        try:
            app_path = import_module(app).__path__
        except AttributeError:
            continue

        # try to find a app.dashboard module
        try:
            imp.find_module('dashboard', app_path)
        except ImportError:
            continue

        # looks like we found it so import it !
        import_module('%s.dashboard' % app)
611917
def is_source_ip_already_locked(ip_address):
    """"""
    if ip_address is None:
        return False
    if config.DISABLE_IP_LOCKOUT:
        return False
    return REDIS_SERVER.get(get_ip_blocked_cache_key(ip_address))
512037
def is_client_method_whitelisted(request: AxesHttpRequest) -> bool:
    

    if settings.AXES_NEVER_LOCKOUT_GET and request.method == 'GET':
        return True

    return False
119941
def running(self):
        
        r = self._client._redis
        flag = '{}:flag'.format(self._queue)
        if bool(r.exists(flag)):
            return r.ttl(flag) is None

        return False
420072
public function check()
    {
        $this->goodPools = getInstance()->sysCache->get($this->name) ?? [];
        if (!$this->goodPools) {
            return false;
        }

        $nowPools = $this->getAllTargets();
        $newPools = array_keys($this->goodPools);
        $loses    = array_diff($nowPools, $newPools);

        if (!empty($loses)) {
            foreach ($loses as $lost) {
                $this->removeTarget($lost);
            }
            writeln('Redis Proxy Remove ( ' . implode(',', $loses) . ' ) from Cluster');
        }

        $adds = array_diff($newPools, $nowPools);
        if (!empty($adds)) {
            foreach ($adds as $add) {
                $this->addTarget($add, $this->pools[$add]);
            }
            writeln('Redis Proxy Add ( ' . implode(',', $adds) . ' ) into Cluster');
        }

        return true;
    }
397237
public function isBlacklisted($uri, $referer, array $blacklistUrls = null)
    {
        if (is_null($blacklistUrls)) {
            $blacklistUrls = $this->blacklistedUrls;
        }
        foreach ($blacklistUrls as $blacklistUrl) {
            $pattern = '`'.$blacklistUrl.'`i';
            $match = preg_match($pattern, $uri) + preg_match($pattern, $referer);

            if ($match > 0) {
                return true;
            }
        }

        return false;
    }
1369817
private void checkForNewShard(DBObject dbObj) {
        int shardNumber = m_tableDef.getShardNumber(dbObj);
        if (shardNumber > 0) {
            SpiderService.instance().verifyShard(m_tableDef, shardNumber);
        }
    }
220817
def has_propagated(self, req: Request, sender: str) -> bool:
        
        return req.key in self and sender in self[req.key].propagates
1289734
def is_dirty(using=None):
    
    if using is None:
        dirty = False
        for using in tldap.backend.connections:
            connection = tldap.backend.connections[using]
            if connection.is_dirty():
                dirty = True
        return dirty
    connection = tldap.backend.connections[using]
    return connection.is_dirty()
76743
def report_self(self):
        '''
        
        '''
        self.logger.debug("Reporting self id", extra={'uuid':self.my_uuid})
        key = "stats:crawler:{m}:{s}:{u}".format(
            m=socket.gethostname(),
            s=self.spider.name,
            u=self.my_uuid)
        self.redis_conn.set(key, time.time())
        self.redis_conn.expire(key, self.ip_update_interval * 2)
456636
def check_security!
      if controller
        if cookies[:browser_id] != self.browser_id
          invalidate!
          Authie.config.events.dispatch(:browser_id_mismatch_error, self)
          raise BrowserMismatch, "Browser ID mismatch"
        end

        unless self.active?
          invalidate!
          Authie.config.events.dispatch(:invalid_session_error, self)
          raise InactiveSession, "Session is no longer active"
        end

        if self.expired?
          invalidate!
          Authie.config.events.dispatch(:expired_session_error, self)
          raise ExpiredSession, "Persistent session has expired"
        end

        if self.inactive?
          invalidate!
          Authie.config.events.dispatch(:inactive_session_error, self)
          raise InactiveSession, "Non-persistent session has expired"
        end

        if self.host && self.host != controller.request.host
          invalidate!
          Authie.config.events.dispatch(:host_mismatch_error, self)
          raise HostMismatch, "Session was created on #{self.host} but accessed using #{controller.request.host}"
        end
      end
    end
1363919
async def is_locked(self, resource):
        

        with await self.connect() as redis:
            lock_identifier = await redis.get(resource)
        if lock_identifier:
            return True
        else:
            return False
823008
private void blacklistIfNeeded(
        String nodeName, List<FaultStatsForType> faultStats) {
    for (FaultStatsForType stat : faultStats) {
      if (isBlacklisted(nodeName, stat.type)) {
        continue;
      }
      if (tooManyFailuresOnNode(stat) ||
          tooManyConnectionFailuresOnNode(stat)) {
        nm.blacklistNode(nodeName, stat.type);
        blacklist(nodeName, stat.type);
      }
    }
  }
541315
def user_is_blacklisted(self, user):
        '''
        
        '''
        return not salt.utils.stringutils.check_whitelist_blacklist(user, blacklist=self.blacklist.get('users', []))