mirror of
https://github.com/vkaelin/LeagueStats.git
synced 2026-03-25 12:57:28 +00:00
chore(commands): only edit matches of a specific summoner
This commit is contained in:
parent
289ad7af2f
commit
071a18596f
1 changed files with 5 additions and 2 deletions
|
|
@ -11,7 +11,8 @@ class EditMatch extends Command {
|
|||
static get signature() {
|
||||
return `
|
||||
edit:match
|
||||
{ concurrent?=10 : Number of concurrent jobs }
|
||||
{ concurrent?=10 : Number of concurrent jobs },
|
||||
{ puuid? : Only update matches for a specific summoner },
|
||||
`
|
||||
}
|
||||
|
||||
|
|
@ -51,10 +52,12 @@ class EditMatch extends Command {
|
|||
async handle(args, options) {
|
||||
console.time('EditMatches')
|
||||
|
||||
this.info(`Concurrent: ${args.concurrent}`)
|
||||
this.info(`PUUID: ${args.puuid}`)
|
||||
this.createQueue(args.concurrent)
|
||||
|
||||
// All matches from the db
|
||||
const matches = await Match.all()
|
||||
const matches = args.puuid ? await Match.query().where({ summoner_puuid: args.puuid }).fetch() : await Match.all()
|
||||
const matchesArray = matches.toJSON()
|
||||
console.log(`${matchesArray.length} matches to edit.`)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue