forked from odota/core
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fd63f47
commit 68ada32
Showing
7 changed files
with
109 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
var async = require('async'); | ||
var utility = require('../util/utility'); | ||
var generateJob = utility.generateJob; | ||
var getData = utility.getData; | ||
var db = require('../store/db'); | ||
var redis = require('../store/redis'); | ||
var cassandra = require('../store/cassandra'); | ||
var queries = require('../store/queries'); | ||
var insertMatch = queries.insertMatch; | ||
var args = process.argv.slice(2); | ||
var match_id = Number(args[0]); | ||
var delay = 1000; | ||
var job = generateJob("api_details", | ||
{ | ||
match_id: match_id | ||
}); | ||
var url = job.url; | ||
getData( | ||
{ | ||
url: url, | ||
delay: delay | ||
}, function(err, body) | ||
{ | ||
if (err) | ||
{ | ||
throw err; | ||
} | ||
if (body.result) | ||
{ | ||
var match = body.result; | ||
match.parse_status = 0; | ||
insertMatch(db, redis, match, | ||
{ | ||
skipCounts: true, | ||
skipAbilityUpgrades: true, | ||
cassandra: cassandra, | ||
}, function(err) | ||
{ | ||
if (err) | ||
{ | ||
throw err; | ||
} | ||
process.exit(0); | ||
}); | ||
} | ||
else | ||
{ | ||
throw body; | ||
} | ||
}); |
File renamed without changes.