Skip to content

Commit

Permalink
fix(runtime): remove unnecessary users.power_creeps DB request
Browse files Browse the repository at this point in the history
  • Loading branch information
artch committed Mar 20, 2019
1 parent f26a6e5 commit a843aa6
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions lib/runtime/data.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,6 @@ exports.get = function(userId, onlyInRoom) {
env.get(env.keys.PUBLIC_MEMORY_SEGMENTS+result[0].activeForeignSegment.user_id)
]) :
q.when(),
db['users.power_creeps'].find({_id: {$in: powerCreepsIds}})
]);

}).then((result) => {
Expand All @@ -225,9 +224,6 @@ exports.get = function(userId, onlyInRoom) {
data: result[4][0]
};
}
if(result[5].length) {
Object.assign(runtimeData.userPowerCreeps, _.indexBy(result[5], '_id'));
}
return runtimeData;
})

Expand Down

0 comments on commit a843aa6

Please sign in to comment.