diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2017-05-11 17:43:12 +0200 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2017-05-11 17:43:12 +0200 |
| commit | 34e3a8871cdfaa4675bfd8e96c38dfe9426ab2ec (patch) | |
| tree | 59d4e196242d910560915d2d08d87520536c32d1 /worker.js | |
| parent | 764572460cc6b50fd253d45bf0821e00e7192f66 (diff) | |
| download | cruncher-release/2.3.0.tar.gz cruncher-release/2.3.0.zip | |
prevent fame calculation being mixed during two concurrent team updatesrelease/2.3.1release/2.3.0
Diffstat (limited to 'worker.js')
| -rw-r--r-- | worker.js | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -118,11 +118,14 @@ if (LOGGLY_TOKEN) replacements: { participant_api_ids: api_ids_global }, type: seq.QueryTypes.UPSERT }); - if (team_ids.length > 0) - await seq.query(team_script, { - replacements: { team_ids: team_ids }, - type: seq.QueryTypes.UPDATE - }); + if (team_ids.length > 0) { + await Promise.each(team_ids, async (tid) => + await seq.query(team_script, { + replacements: { team_id: tid }, + type: seq.QueryTypes.UPDATE + }) + ); + } if (api_ids_player.length > 0) await seq.query(player_script, { replacements: { participant_api_ids: api_ids_player }, |
