{"html_url": "https://github.com/simonw/datasette/issues/1579#issuecomment-1000476413", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1579", "id": 1000476413, "node_id": "IC_kwDOBm6k_c47og79", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-12-23T18:56:06Z", "updated_at": "2021-12-23T18:56:06Z", "author_association": "OWNER", "body": "This is technically a breaking change, but a GitHub code search at https://cs.github.com/?scopeName=All+repos&scope=&q=execute_write%20datasette%20-owner%3Asimonw shows only one repo not-owned-by-me using this, and they're using `block=True`: https://github.com/mfa/datasette-webhook-write/blob/e82440f372a2f2e3ed27d1bd34c9fa3a53b49b94/datasette_webhook_write/__init__.py#L88-L89", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1087931918, "label": "`.execute_write(... block=True)` should be the default behaviour"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1579#issuecomment-1000477621", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1579", "id": 1000477621, "node_id": "IC_kwDOBm6k_c47ohO1", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-12-23T18:59:12Z", "updated_at": "2021-12-23T18:59:12Z", "author_association": "OWNER", "body": "The easiest way to change this would be to default to `block=True` such that you need to pass `block=False` to the APIs to have them do fire-and-forget.\r\n\r\nAn alternative would be to add new, separately named methods which do the fire-and-forget thing.\r\n\r\nIf I hadn't recently added `execute_write_script` and `execute_write_many` in #1570 I'd be more into this idea, but I don't want to end up with eight methods - `execute_write`, `execute_write_queue`, `execute_write_many`, `execute_write_many_queue`, `execute_write_script`, `execute_write_scrript_queue`, `execute_write_fn`, `execute_write_fn_queue`.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1087931918, "label": "`.execute_write(... block=True)` should be the default behaviour"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1579#issuecomment-1000477813", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1579", "id": 1000477813, "node_id": "IC_kwDOBm6k_c47ohR1", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-12-23T18:59:41Z", "updated_at": "2021-12-23T18:59:41Z", "author_association": "OWNER", "body": "I'm going to go with `execute_write(..., block=False)` as the mechanism for fire-and-forget write queries.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1087931918, "label": "`.execute_write(... block=True)` should be the default behaviour"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1579#issuecomment-1000479737", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1579", "id": 1000479737, "node_id": "IC_kwDOBm6k_c47ohv5", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-12-23T19:04:23Z", "updated_at": "2021-12-23T19:04:23Z", "author_association": "OWNER", "body": "Updated documentation: https://github.com/simonw/datasette/blob/00a2895cd2dc42c63846216b36b2dc9f41170129/docs/internals.rst#await-dbexecute_writesql-paramsnone-blocktrue", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1087931918, "label": "`.execute_write(... block=True)` should be the default behaviour"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1579#issuecomment-1000481686", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1579", "id": 1000481686, "node_id": "IC_kwDOBm6k_c47oiOW", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-12-23T19:09:23Z", "updated_at": "2021-12-23T19:09:23Z", "author_association": "OWNER", "body": "Re-opening this because I missed updating some of the docs, and I also need to update Datasette's own code to not use `block=True` in a bunch of places.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1087931918, "label": "`.execute_write(... block=True)` should be the default behaviour"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1579#issuecomment-1000485505", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1579", "id": 1000485505, "node_id": "IC_kwDOBm6k_c47ojKB", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-12-23T19:19:13Z", "updated_at": "2021-12-23T19:19:13Z", "author_association": "OWNER", "body": "Updated docs for `execute_write_fn()`: https://github.com/simonw/datasette/blob/75153ea9b94d09ec3d61f7c6ebdf378e0c0c7a0b/docs/internals.rst#await-dbexecute_write_fnfn-blocktrue", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1087931918, "label": "`.execute_write(... block=True)` should be the default behaviour"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1579#issuecomment-1000485719", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1579", "id": 1000485719, "node_id": "IC_kwDOBm6k_c47ojNX", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-12-23T19:19:45Z", "updated_at": "2021-12-23T19:19:45Z", "author_association": "OWNER", "body": "All of those removed `block=True` lines in 8c401ee0f054de2f568c3a8302c9223555146407 really help confirm to me that this was a good decision.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1087931918, "label": "`.execute_write(... block=True)` should be the default behaviour"}, "performed_via_github_app": null}