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', type: 'Ranked',
name: 'CLASH', name: 'CLASH',
}, },
720: {
type: 'Ranked',
name: 'CLASH ARAM',
},
800: { 800: {
type: 'Bot', type: 'Bot',
name: '3vs3 Co-op vs. AI (Intermediate)', name: '3vs3 Co-op vs. AI (Intermediate)',

View file

@ -56,9 +56,6 @@ export default class JaxRequest {
} catch ({ statusCode, ...rest }) { } catch ({ statusCode, ...rest }) {
this.retries-- this.retries--
console.log('JAX ERROR')
console.log(rest?.cause?.code)
if ( if (
statusCode !== 500 && statusCode !== 500 &&
statusCode !== 503 && statusCode !== 503 &&
@ -74,6 +71,8 @@ export default class JaxRequest {
!this.endpoint.includes('match/v4/matchlists/by-account') !this.endpoint.includes('match/v4/matchlists/by-account')
) { ) {
Logger.error(`URL ${url}: `) Logger.error(`URL ${url}: `)
console.log('JAX ERROR')
console.log(rest?.cause?.code)
// Logger.error(`JaxRequest Error ${statusCode}: `, rest) // 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 we have to store some matches in the db */
if (matchesFromApi.length !== 0) { if (matchesFromApi.length !== 0) {
// Remove bugged matches from the Riot API + tutorial games // Remove bugged matches from the Riot API + tutorial games
const filteredMatches = matchesFromApi const filteredMatches = matchesFromApi.filter(notEmpty).filter(
.filter(notEmpty) (m) =>
.filter( !tutorialQueues.includes(m.info.queueId) &&
(m) => m.info.teams.length > 0 &&
!tutorialQueues.includes(m.info.queueId) && m.info.participants.length > 0 &&
m.info.teams.length > 0 && m.info.gameMode !== 'PRACTICETOOL' &&
m.info.participants.length > 0 && m.info.gameMode !== 'CHERRY' // Arena mode
m.info.gameMode !== 'PRACTICETOOL' )
)
// Transform raw matches data // Transform raw matches data
const parsedMatches: any = await MatchParser.parse(filteredMatches) const parsedMatches: any = await MatchParser.parse(filteredMatches)