code: def _process_plugin(self, plugin):
          '''
          Logic to handle each plugin that is active
  
          @param plugin: a plugin dict object
          '''
          instance = plugin['instance']
          regex = plugin['regex']
          for key in self.redis_conn.scan_iter(match=regex):
              # acquire lock
              lock = self._create_lock_object(key)
  
              try:
                  if lock.acquire(blocking=False):
                      val = self.redis_conn.get(key)
                      self._process_key_val(instance, key, val)
              except Exception:
                  self.logger.error(traceback.format_exc())
                  self._increment_fail_stat('{k}:{v}'.format(k=key, v=val))
  
                  self._process_failures(key)
  
              # remove lock regardless of if exception or was handled ok
              if lock._held:
                  self.logger.debug("releasing lock")
                  lock.release(f _process_plugin(self, plugin):
          '''
          Logic to handle each plugin that is active
  
          @param plugin: a plugin dict object
          '''
          instance = plugin['instance']
          regex = plugin['regex']
          for key in self.redis_conn.scan_iter(match=regex):
              # acquire lock
              lock = self._create_lock_object(key)
  
              try:
                  if lock.acquire(blocking=False):
                      val = self.redis_conn.get(key)
                      self._process_key_val(instance, key, val)
              except Exception:
                  self.logger.error(traceback.format_exc())
                  self._increment_fail_stat('{k}:{v}'.format(k=key, v=val))
  
                  self._process_failures(key)
  
              # remove lock regardless of if exception or was handled ok
              if lock._held:
                  self.logger.debug("releasing lock")
                  lock.release()
docs: Logic to handle each plugin that is active
  
          @param plugin: a plugin dict object