Skip to content

Commit

Permalink
fix: db lock
Browse files Browse the repository at this point in the history
  • Loading branch information
hanxiao committed May 7, 2022
1 parent b719500 commit 47853e3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions executors/store/executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ class MyStore(Executor):

def __init__(self, store_path: str, **kwargs):
super().__init__(**kwargs)
now = datetime.now()
table_name = now.strftime('%Y%d%m%H%M%S')
self.storage = DocumentArray(storage='sqlite', config={'connection': store_path, 'table_name': f'table{table_name}'})
self.storage = DocumentArray(storage='sqlite', config={'connection': store_path, 'table_name': f'dallemega'})

@requests(on='/')
def store(self, docs: DocumentArray, **kwargs):
Expand Down
2 changes: 1 addition & 1 deletion flow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ executors:
py_modules:
- executors/store/executor.py
uses_with:
store_path: dalle-flow
store_path: dalle-flow.db

0 comments on commit 47853e3

Please sign in to comment.