{"id": 1501843596, "node_id": "PR_kwDOBm6k_c5FuaJm", "number": 1965, "title": "Detect server start/stop more reliably.", "user": {"value": 11321, "label": "janl"}, "state": "closed", "locked": 0, "assignee": null, "milestone": null, "comments": 2, "created_at": "2022-12-18T10:03:42Z", "updated_at": "2022-12-20T19:08:26Z", "closed_at": "2022-12-18T16:01:51Z", "author_association": "CONTRIBUTOR", "pull_request": "simonw/datasette/pulls/1965", "body": "This is useful, especially in testing, since your test hosts might not reliabliy start the server within two seconds, so we do a definite check before progressing.\r\n\r\nBy the same token, after `kill $server_pid` wait for the pid to be gone from the process list.\r\n\r\nSince now the script can end prematurely, I also added a cleanup function to make sure the temporary certs are removed in any case.\r\n\r\nn.b. this could also be done with the use of `trap 'fn' ERR` but that felt like a bit too much magic for this short a script.\r\n\r\n\r\n----\n:books: Documentation preview :books:: https://datasette--1965.org.readthedocs.build/en/1965/\n\r\n", "repo": {"value": 107914493, "label": "datasette"}, "type": "pull", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/datasette/issues/1965/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": 0, "state_reason": null}