summaryrefslogtreecommitdiff
path: root/worker.js
diff options
context:
space:
mode:
authorKapil Viren Ahuja <k.v.ahuja@gmail.com>2017-04-01 10:50:57 +0530
committerKapil Viren Ahuja <k.v.ahuja@gmail.com>2017-04-01 10:50:57 +0530
commitc15e6575dc5e28d391766eef04ea84b86f7e7793 (patch)
tree61909973b259199dfc79a258ea48697908018efd /worker.js
parent2f5ce153253164b50aff24a96d8b81abf2b17a90 (diff)
downloadprocessor-c15e6575dc5e28d391766eef04ea84b86f7e7793.tar.gz
processor-c15e6575dc5e28d391766eef04ea84b86f7e7793.zip
Pushed created_at down the stairs ream
Diffstat (limited to 'worker.js')
-rw-r--r--worker.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/worker.js b/worker.js
index 29e1d03..6a91f30 100644
--- a/worker.js
+++ b/worker.js
@@ -108,6 +108,7 @@ var RABBITMQ_URI = process.env.RABBITMQ_URI || "amqp://localhost",
await Promise.all(match.rosters.map(async (roster) => {
roster.match_api_id = match.api_id;
roster.shard_id = match.shard_id;
+ roster.created_at = match.created_at;
await model.Roster.upsert(roster, {
include: [ model.Participant/*, model.Team */]
@@ -116,7 +117,9 @@ var RABBITMQ_URI = process.env.RABBITMQ_URI || "amqp://localhost",
await Promise.all(roster.participants.map(async (participant) => {
participant.shard_id = roster.shard_id;
participant.roster_api_id = roster.api_id;
+ participant.created_at = roster.created_at;
participant.player_api_id = participant.player.api_id;
+
await model.Participant.upsert(participant, {
include: [ model.Player ]
});