Too much wine is a bad idea. More than two regular-sized glasses and I’m no good.
Woke up with an absolute stinker of a headache. Really horrible. Glad I had some decent painkillers, as they seem to have worked their magic, pretty much. Well, that and coffee.
So it turns out, wonder upon wonder, that Podiant stayed up all the way through the night. There were some errors but nothing to do with memory, database connections or any load balancing problems. I think I may have cracked it, although I remain sceptical and every time a page takes more than a second to load, I start to get nervous.
I spent most of the morning lazing around, finishing Mindhunter (I was a bit sad to see the series end like it did... I really wanted more) and feeling a bit sorry for myself.
Then I was able to squash a couple of Podiant bugs that were causing big problems but were fairly easily fixed. The invalidation stuff for CloudFront - which was stopping feeds from appearing to update after they were purged - worked on the first try. Then I set to work on the player, which has been broken in Safari for a few weeks because of their autoplay stuff. I refactored a bunch of code around the Wavesurfer player and it now works even better than it did before, and involves less load on the server. So now the audiocontext data is actually part of the page instead of being a JSONP call, and the player is established when the page loads - since it’s only browser work, not server work that needs to be done.
One thing I should check is that the player isn’t tracking a “view” as a full play, as I suspect it might be. I’ll probably need to write an AJAX view that does the tracking for the play when the button is clicked (and maybe once, say, more than 20% of the audio is played?) as I reckon it’s probably being run when the player page actually loads... which is going to play havoc with stats.
But that’s probably a job for tomorrow. For now, I’m going to chill out and not do too much unless someone specifically asks. This weekend was really rough and I could do with a bit of a mental sorbet.