home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 881668759

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/datasette/issues/1231#issuecomment-881668759 https://api.github.com/repos/simonw/datasette/issues/1231 881668759 IC_kwDOBm6k_c40jTKX 9599 2021-07-16T19:27:46Z 2021-07-16T19:27:46Z OWNER

Second attempt at this: ```diff diff --git a/datasette/app.py b/datasette/app.py index 5976d8b..5f348cb 100644 --- a/datasette/app.py +++ b/datasette/app.py @@ -224,6 +224,7 @@ class Datasette: self.inspect_data = inspect_data self.immutables = set(immutables or []) self.databases = collections.OrderedDict() + self._refresh_schemas_lock = asyncio.Lock() self.crossdb = crossdb if memory or crossdb or not self.files: self.add_database(Database(self, is_memory=True), name="_memory") @@ -332,6 +333,12 @@ class Datasette: self.client = DatasetteClient(self)

 async def refresh_schemas(self):
  • if self._refresh_schemas_lock.locked():
  • return
  • async with self._refresh_schemas_lock:
  • await self._refresh_schemas() +
  • async def _refresh_schemas(self): internal_db = self.databases["_internal"] if not self.internal_db_created: await init_internal_db(internal_db) ```
{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
811367257  
Powered by Datasette · Queries took 0.696ms · About: github-to-sqlite