Race condition in date guessing #1
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Depending on the time in Japan and the state of the schedule data, dates might be ahead by one day. If the time is midnight or shortly after in Japan, and the schedule has items from the previous day still in it, it'll throw off the date guessing.
In this case, id 13 and onward were actually from the previous day and were mistakenly duplicated. The workaround is to not do database insertions near midnight in Japan.
More details on what's safe and what's not
The work-around is to avoid doing schedule insertions near midnight JST. I treat it like a database dead zone (for the schedule table) from approximately 22:00 JST to 4:00 JST. However, mscale insertions and video_id updates are unaffected and can safely be done 24/7.
The heart of the problem comes from ambiguity in the schedule API response and my script not being smart enough near this delicate time on boundaries between days.
Thoughts on a potential fix
If both of the above are true, do I need to adjust back one day?