fix: remove arena matches for now

This commit is contained in:
Valentin Kaelin 2023-08-25 17:10:33 +02:00
parent 8f878be720
commit e45eaa4959
3 changed files with 14 additions and 12 deletions

View file

@ -41,6 +41,10 @@ export const gameModes = {
type: 'Ranked',
name: 'CLASH',
},
720: {
type: 'Ranked',
name: 'CLASH ARAM',
},
800: {
type: 'Bot',
name: '3vs3 Co-op vs. AI (Intermediate)',

View file

@ -56,9 +56,6 @@ export default class JaxRequest {
} catch ({ statusCode, ...rest }) {
this.retries--
console.log('JAX ERROR')
console.log(rest?.cause?.code)
if (
statusCode !== 500 &&
statusCode !== 503 &&
@ -74,6 +71,8 @@ export default class JaxRequest {
!this.endpoint.includes('match/v4/matchlists/by-account')
) {
Logger.error(`URL ${url}: `)
console.log('JAX ERROR')
console.log(rest?.cause?.code)
// Logger.error(`JaxRequest Error ${statusCode}: `, rest)
}

View file

@ -130,15 +130,14 @@ class MatchService {
/* If we have to store some matches in the db */
if (matchesFromApi.length !== 0) {
// Remove bugged matches from the Riot API + tutorial games
const filteredMatches = matchesFromApi
.filter(notEmpty)
.filter(
(m) =>
!tutorialQueues.includes(m.info.queueId) &&
m.info.teams.length > 0 &&
m.info.participants.length > 0 &&
m.info.gameMode !== 'PRACTICETOOL'
)
const filteredMatches = matchesFromApi.filter(notEmpty).filter(
(m) =>
!tutorialQueues.includes(m.info.queueId) &&
m.info.teams.length > 0 &&
m.info.participants.length > 0 &&
m.info.gameMode !== 'PRACTICETOOL' &&
m.info.gameMode !== 'CHERRY' // Arena mode
)
// Transform raw matches data
const parsedMatches: any = await MatchParser.parse(filteredMatches)