diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2017-04-21 12:19:38 +0200 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2017-04-21 12:19:38 +0200 |
| commit | 3377d777bd9278581eb2e3508b3229aa5521edb7 (patch) | |
| tree | 8efce7566c9b9265f599c5ad305239e32e97f689 | |
| parent | 4bfee6ef24eab56cf3858581732477e24a51d639 (diff) | |
| download | processor-3377d777bd9278581eb2e3508b3229aa5521edb7.tar.gz processor-3377d777bd9278581eb2e3508b3229aa5521edb7.zip | |
more crash hotfixes
| -rw-r--r-- | worker.js | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -216,6 +216,11 @@ function flatten(obj) { // no race conditions within one batch await Promise.each(player_objects, async (p) => { const player = flatten(p); + if (player == undefined) { + logger.error("this player object is fucked up, ignoring", + { player: p, processed: player }); + return; + } if (processed_players.has(player.api_id)) { logger.warn("got player in additional region", { name: player.name, region: player.shard_id }); @@ -224,7 +229,7 @@ function flatten(obj) { const duplicate = player_records_direct.find( (pr) => pr.api_id == player.api_id); if (duplicate) { - console.error("duplicate disappeared! please investigate, ignoring for now…"); + logger.error("duplicate disappeared! please investigate, ignoring for now…"); return; } if (duplicate.created_at < player.created_at) { |
