mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
--nolock mode to ignore locked files, closes #1744
This commit is contained in:
parent
a5acfff4bd
commit
3508bf7875
5 changed files with 15 additions and 1 deletions
|
|
@ -213,6 +213,7 @@ class Datasette:
|
|||
config_dir=None,
|
||||
pdb=False,
|
||||
crossdb=False,
|
||||
nolock=False,
|
||||
):
|
||||
assert config_dir is None or isinstance(
|
||||
config_dir, Path
|
||||
|
|
@ -238,6 +239,7 @@ class Datasette:
|
|||
self.databases = collections.OrderedDict()
|
||||
self._refresh_schemas_lock = asyncio.Lock()
|
||||
self.crossdb = crossdb
|
||||
self.nolock = nolock
|
||||
if memory or crossdb or not self.files:
|
||||
self.add_database(Database(self, is_memory=True), name="_memory")
|
||||
# memory_name is a random string so that each Datasette instance gets its own
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue