home / github / issue_comments

Menu
  • GraphQL API

issue_comments: 671151170

This data as json

html_url issue_url id node_id user created_at updated_at author_association body reactions issue performed_via_github_app
https://github.com/simonw/sqlite-utils/issues/132#issuecomment-671151170 https://api.github.com/repos/simonw/sqlite-utils/issues/132 671151170 MDEyOklzc3VlQ29tbWVudDY3MTE1MTE3MA== 9599 2020-08-10T03:52:02Z 2020-08-10T03:52:02Z OWNER I'm having trouble figuring out how to write a test that locks a SQLite database (so I can test that `--retry` actually works). I tried this recipe but it didn't seem to prevent another process from running `pragma journal_mode='wal';` against that database: ```python import time import sys import sqlite3 filename = sys.argv[-1] db = sqlite3.connect(filename) with db: db.execute("create table if not exists counter(id integer primary key, counter text)") time.sleep(100) ``` {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} 675839512  
Powered by Datasette · Queries took 1.048ms