{"id":128,"date":"2023-11-28T14:43:00","date_gmt":"2023-11-28T14:43:00","guid":{"rendered":"https:\/\/acc.scriv.me.uk\/moredepth\/?p=128"},"modified":"2023-11-28T14:43:03","modified_gmt":"2023-11-28T14:43:03","slug":"immediate-outage","status":"publish","type":"post","link":"https:\/\/acc.scriv.me.uk\/moredepth\/2023\/11\/28\/immediate-outage\/","title":{"rendered":"Immediate Outage"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">I was about 10 emails in last night when I refreshed out of curiosity to see if anyone had guessed yet. They had, and it had not gone well. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Well, it had gone well from the guessing side, with Neil B\u2019s guess having successfully made it into the database and everything, but the rest of the site was broken. An error message on screen suggested something wrong with the widget that calculated streaks of correct guesses was to blame, and so I went and disabled that in the hope that I could get the page loading quickly and then return to fixing the underlying code problem later. All this did was remove the on-screen error message \u2013 the page still wasn\u2019t loading. After scratching my head a bit I went hunting down the error logs that the server keeps and eventually, but not immediately, I found the source of the problem as a result. Also mid-competition last year I coded a new thing that showed how many points a team had scored in the previous day, and it was falling over when it couldn\u2019t find a previous day to compare things to (in essence). In fact, that\u2019s what both this and the now disabled \u201cstreak calculator\u201d were getting hung up on.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">So I added a bit of code that said \u201cdon\u2019t do this on day 0\u201d to both those things. Thinking about it I might need to widen the scope of that to day 1 as well \u2013 we\u2019ll see if it falls over again after the first window is open. I\u2019m almost sure it will! I really should test things better\u2026<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Anyway, at least until then, it\u2019s all up and working now. Guess away!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I was about 10 emails in last night when I refreshed out of curiosity to see if anyone had guessed yet. They had, and it had not gone well. Well, it had gone well from the guessing side, with Neil B\u2019s guess having successfully made it into the database and everything, but the rest of&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[4],"tags":[],"class_list":["post-128","post","type-post","status-publish","format-standard","hentry","category-website","content","has-not-featured-image"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/acc.scriv.me.uk\/moredepth\/wp-json\/wp\/v2\/posts\/128","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/acc.scriv.me.uk\/moredepth\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/acc.scriv.me.uk\/moredepth\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/acc.scriv.me.uk\/moredepth\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/acc.scriv.me.uk\/moredepth\/wp-json\/wp\/v2\/comments?post=128"}],"version-history":[{"count":1,"href":"https:\/\/acc.scriv.me.uk\/moredepth\/wp-json\/wp\/v2\/posts\/128\/revisions"}],"predecessor-version":[{"id":130,"href":"https:\/\/acc.scriv.me.uk\/moredepth\/wp-json\/wp\/v2\/posts\/128\/revisions\/130"}],"wp:attachment":[{"href":"https:\/\/acc.scriv.me.uk\/moredepth\/wp-json\/wp\/v2\/media?parent=128"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/acc.scriv.me.uk\/moredepth\/wp-json\/wp\/v2\/categories?post=128"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/acc.scriv.me.uk\/moredepth\/wp-json\/wp\/v2\/tags?post=128"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}