How to use the dotaconstants.anonymous_account_id function in dotaconstants

To help you get started, we’ve selected a few dotaconstants examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github odota / core / dev / preloader.js View on Github external
stream.on('data', (player) => {
  if (!player.account_id || player.account_id === constants.anonymous_account_id)
    {
    return;
  }
  conc += 1;
  if (conc > 5)
    {
    stream.pause();
  }
  request(config.ROOT_URL + '/api/players/' + player.account_id, (err, resp, body) => {
    if (err || resp.statusCode !== 200)
        {
      console.error('error: %s', err || resp.statusCode);
    }
    console.log(player.account_id);
    setTimeout(() => {
      stream.resume();
github odota / core / dev / postgresToCassandra.js View on Github external
function insertPlayerMatch(pm, cb) {
    if (pm.account_id === constants.anonymous_account_id) {
      delete pm.account_id;
    }
    const obj2 = serialize(pm);
    const query2 = 'INSERT INTO player_matches JSON ?';
    cassandra.execute(query2, [JSON.stringify(obj2)],
      {
        prepare: true,
      }, cb);
  }
}