Commit 627ed44d authored by soheib's avatar soheib
Browse files

add something

parent f503cf6d
...@@ -405,7 +405,7 @@ export class AppService implements OnApplicationBootstrap { ...@@ -405,7 +405,7 @@ export class AppService implements OnApplicationBootstrap {
totalMentions += valid_mentions + invalid_mentions + pending_mentions totalMentions += valid_mentions + invalid_mentions + pending_mentions
console.log("eachMention : ", valid_mentions + invalid_mentions + pending_mentions); console.log("eachMention : ", valid_mentions + invalid_mentions + pending_mentions);
await this.delay(_.random(500,1000))
let foundUser = await this.requestModel.findOne({ username: username }) let foundUser = await this.requestModel.findOne({ username: username })
if (!foundUser) { if (!foundUser) {
await this.resultModel.create({ await this.resultModel.create({
...@@ -413,16 +413,17 @@ export class AppService implements OnApplicationBootstrap { ...@@ -413,16 +413,17 @@ export class AppService implements OnApplicationBootstrap {
valid_mentions, valid_mentions,
invalid_mentions, invalid_mentions,
pending_mentions, pending_mentions,
score: valid_mentions + 1 score: valid_mentions + 1,
valid_users,inValid_users,pending_users
}) })
} else { } else {
await this.resultModel.updateOne(foundUser._id, { await this.resultModel.updateOne(foundUser._id, {
username: username, username: username,
valid_mentions, valid_mentions,
invalid_mentions, invalid_mentions,
pending_mentions, pending_mentions,
score: valid_mentions + 1 score: valid_mentions + 1,
valid_users,inValid_users,pending_users
}) })
} }
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment