estiens / world_cup_json

Rails backend for a scraper that outputs World Cup data as JSON
927 stars 106 forks source link

Any chance `events` will live update? #210

Open pedsm opened 1 year ago

pedsm commented 1 year ago

Currently, the current game doesn't get live event updates:

"home_team_events": [],
"away_team_events": [],

Only returning empty strings. Any chance this could be live (a minute or two delay is what I mean when I say "live")

estiens commented 1 year ago

I will look and see if there were any errors, they have been coming in live just fine for me though because I ingest them with a slackbot and have even seen goals and subs show up before I saw them on the TV

dg01d commented 1 year ago

Hi @estiens

There's definitely noting coming through from /matches/current in home_team or away_team events

As @pedsm pedsm says, its just an empty array.

estiens commented 1 year ago

Sorry ya'll. Watching USA ENG at a bar so can't debug right now but will look at it later!

estiens commented 1 year ago

I can restart it from here though. First debugging step anyway while pulling up the logs :D

pedsm commented 1 year ago

Yes sorry I did see some events come in live after I posted this.

pedsm commented 1 year ago

Looks to be coming through on my end (might have been because the current game had no events before @dg01d )

estiens commented 1 year ago

There is a possibility one of the follower databases was overloaded and stopped writing, so depending on which db you were routed to it might not have retrieved the events, should be fixed now and everything has looked again today for me

Current stats: 3.5k RPM/300ms response time with no errors

pedsm commented 1 year ago

Looks like the events are updating live, but I did notice a bit of an edge case. On game 28 https://worldcupjson.net/matches/28 we had a Goal event followed by a VAR cancellation. This keeps the goal event around. Not sure what the behaviour should be there?