Return the watcher hash associated with the req_id. If the req_id
 is the ZKRB_GLOBAL_CB_REQ, then does not clear the req from the internal
 store, otherwise the req_id is removed.
486663
def get_watcher(req_id, opts={})
        @mutex.synchronize do
          if Constants::ZKRB_GLOBAL_CB_REQ == req_id
            { :watcher => @default_watcher, :watcher_context => nil }
          elsif opts[:keep]
            @watcher_reqs[req_id]
          else
            @watcher_reqs.delete(req_id)
          end
        end
      end
864027
def remove_watcher(self, issue, watcher):
        
        url = self._get_url('issue/' + str(issue) + '/watchers')
        params = {'username': watcher}
        result = self._session.delete(url, params=params)
        return result
1166108
async def _watch(self, node, conn, names):
        ""
        for name in names:
            slot = self._determine_slot('WATCH', name)
            dist_node = self.connection_pool.get_node_by_slot(slot)
            if node.get('name') != dist_node['name']:
                # raise error if commands in a transaction can not hash to same node
                if len(node) > 0:
                    raise ClusterTransactionError("Keys in request don't hash to the same node")
        if self.explicit_transaction:
            raise RedisError('Cannot issue a WATCH after a MULTI')
        await conn.send_command('WATCH', *names)
        return await conn.read_response()
740865
def namedb_get_preorder(cur, preorder_hash, current_block_number, include_expired=False, expiry_time=None):
    

    select_query = None 
    args = None 

    if include_expired:
        select_query = "SELECT * FROM preorders WHERE preorder_hash = ?;"
        args = (preorder_hash,)

    else:
        assert expiry_time is not None, "expiry_time is required with include_expired"
        select_query = "SELECT * FROM preorders WHERE preorder_hash = ? AND block_number < ?;"
        args = (preorder_hash, expiry_time + current_block_number)

    preorder_rows = namedb_query_execute( cur, select_query, (preorder_hash,))
    preorder_row = preorder_rows.fetchone()
    if preorder_row is None:
        # no such preorder 
        return None

    preorder_rec = {}
    preorder_rec.update( preorder_row )
    
    return preorder_rec
428912
function(req) {

    var pk = module.exports.parsePk(req);

    // Validate the required `id` parameter
    if (!pk) {

      var err = new Error(
        'No `id` parameter provided.' +
        '(Note: even if the model\'s primary key is not named `id`- ' +
        '`id` should be used as the name of the parameter- it will be ' +
        'mapped to the proper primary key name)'
      );
      err.status = 400;
      throw err;
    }

    return pk;
  }
889703
def get_osdb_hash(self):
        
        if self._osdb_hash is None:
            self._osdb_hash = self._calculate_osdb_hash()
        return self._osdb_hash
313800
function getRequestId(req) {
  const id = uuid.v1();
  req.id = id;
  return {
    req_id: id,
  };
}
196535
def _watchdog(self):
        
        if not self.is_alive:
            logger.debug("Player has already terminated.")
            self._exit_event.set()
            return
        logger.debug("Watching %s[%d]",
                     self._player_command, self.sub_proc.pid)
        returncode = self.sub_proc.wait()
        logger.debug("%s[%d] exit with code %d",
                     self._player_command, self.sub_proc.pid, returncode)
        self._exit_event.set()
327744
def unwatch_source(self, source_id):
        
        source_id = int(source_id)
        self._watched_sources.remove(source_id)
        return (yield from
                self._send_cmd("WATCH S[%d] OFF" % (
                    source_id, )))
972850
def execute_watch(self, id=None, body=None, params=None):
        
        return self.transport.perform_request(
            "PUT",
            _make_path("_watcher", "watch", id, "_execute"),
            params=params,
            body=body,
        )
74594
def get(self, id_):
        
        if self.api.queue_exists(id_):
            return Queue(self, {"queue": {"name": id_, "id_": id_}}, key="queue")
        raise exc.NotFound("The queue '%s' does not exist." % id_)
773050
def checkPieceHash(pieceIndex)
      id = returnAndIncrRequestId
      return id if @state == :after_stop
      @requests.push [id, :hash_piece, pieceIndex]
      @requestsSemaphore.signal
      id
    end
362088
def get_hash(self, handle):
        
        response = self.open_url(url=handle, suffix='.hash')
        try:
            return response.read()
        finally:
            response.close()
477412
def __check_hash(self, message):
        
        return message[W_HASH] == self.__make_hash(message[W_MESSAGE], self.__token, message[W_SEQ])
850656
def watcher(self) -> Watcher:
        
        if not hasattr(self, "_watcher"):
            self._watcher = Watcher()
        return self._watcher
175743
def has_in_watched(self, watched):
        
        assert isinstance(watched, github.Repository.Repository), watched
        status, headers, data = self._requester.requestJson(
            "GET",
            "/repos/" + watched._identity + "/subscription"
        )
        return status == 200
74833
def delete_watch(self, id, params=None):
        
        if id in SKIP_IN_PATH:
            raise ValueError("Empty value passed for a required argument 'id'.")
        return self.transport.perform_request(
            "DELETE", _make_path("_watcher", "watch", id), params=params
        )