Skip to content

Commit 0e51dd5

Browse files
committed
Bump Version 0.5.15
1 parent 5f9db5f commit 0e51dd5

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
66
name = "superduper-framework"
77
description = "🔮 Bring AI to your favourite database 🔮"
88
readme = "README.md"
9-
version = '0.5.14'
9+
version = '0.5.15'
1010
license = {file = "LICENSE"}
1111
maintainers = [{name = "superduper.io, Inc.", email = "opensource@superduper.com"}]
1212
keywords = [

superduper/rest/build.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,10 @@
3131

3232

3333
PENDING_COMPONENTS = set()
34-
lock = threading.Lock()
34+
# lock = threading.Lock()
35+
import asyncio
36+
lock = asyncio.Lock()
37+
3538

3639

3740
class Tee:
@@ -193,7 +196,7 @@ def describe_tables(db: 'Datalayer' = DatalayerDependency()):
193196
return db.databackend.list_tables_or_collections()
194197

195198
@app.add('/db/apply', method='post')
196-
def db_apply(
199+
async def db_apply(
197200
info: t.Dict,
198201
background_tasks: BackgroundTasks,
199202
id: str | None = 'test',
@@ -202,7 +205,7 @@ def db_apply(
202205
cls_path = info['_builds'][info['_base'][1:]]['_path']
203206
cls = import_object(cls_path)
204207
type_id = cls.type_id
205-
with lock:
208+
async with lock:
206209
PENDING_COMPONENTS.add((type_id, info['identifier']))
207210
if '_variables' in info:
208211
info['_variables']['output_prefix'] = CFG.output_prefix
@@ -273,10 +276,10 @@ def db_show(
273276
return out
274277

275278
@app.add('/db/remove', method='post')
276-
def db_remove(
279+
async def db_remove(
277280
type_id: str, identifier: str, db: 'Datalayer' = DatalayerDependency()
278281
):
279-
with lock:
282+
async with lock:
280283
PENDING_COMPONENTS.discard((type_id, identifier))
281284
db.remove(type_id=type_id, identifier=identifier, recursive=True, force=True)
282285
return {'status': 'ok'}

0 commit comments

Comments
 (0)