mirror of
https://github.com/placeholder-soft/chroma.git
synced 2026-04-29 12:24:58 +08:00
cleanup
This commit is contained in:
@@ -125,7 +125,6 @@ async def count(space_key: str = None):
|
||||
'''
|
||||
Returns the number of records in the database
|
||||
'''
|
||||
print("space_key", space_key)
|
||||
return {"count": app._db.count(space_key=space_key)}
|
||||
|
||||
@app.post("/api/v1/reset")
|
||||
|
||||
@@ -73,10 +73,8 @@ class Clickhouse(Database):
|
||||
|
||||
def count(self, space_key=None):
|
||||
where_string = ""
|
||||
print("space_key", space_key)
|
||||
if space_key is not None:
|
||||
where_string = f"WHERE space_key = '{space_key}'"
|
||||
print("where_string: ", where_string)
|
||||
return self._conn.execute(f"SELECT COUNT() FROM embeddings {where_string}")[0][0]
|
||||
|
||||
def fetch(self, where_filter={}, sort=None, limit=None, offset=None, columnar=False):
|
||||
@@ -141,8 +139,6 @@ class Clickhouse(Database):
|
||||
if where_filter:
|
||||
where_filter = f"WHERE {where_filter}"
|
||||
|
||||
print("DELETE FROM embeddings", where_filter)
|
||||
|
||||
val = self._conn.execute(f'''
|
||||
DELETE FROM
|
||||
embeddings
|
||||
|
||||
@@ -33,28 +33,6 @@ services:
|
||||
networks:
|
||||
- chroma-net
|
||||
|
||||
redis:
|
||||
image: redis:6-alpine
|
||||
networks:
|
||||
- chroma-net
|
||||
|
||||
worker:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: DockerfileCelery
|
||||
command: celery worker --app=worker.celery --loglevel=info
|
||||
volumes:
|
||||
- ./:/chroma-server/
|
||||
- index_data:/index_data
|
||||
environment:
|
||||
- CELERY_BROKER_URL=redis://redis:6379/0
|
||||
- CELERY_RESULT_BACKEND=redis://redis:6379/0
|
||||
depends_on:
|
||||
- server_test
|
||||
- redis
|
||||
networks:
|
||||
- chroma-net
|
||||
|
||||
volumes:
|
||||
index_data:
|
||||
driver: local
|
||||
|
||||
Reference in New Issue
Block a user