mirror of
https://github.com/mruwnik/memory.git
synced 2025-11-13 08:14:05 +01:00
better docker compise
This commit is contained in:
parent
d7e403fb83
commit
3b216953ab
@ -1,5 +1,3 @@
|
|||||||
version: "3.9"
|
|
||||||
|
|
||||||
# --------------------------------------------------------------------- networks
|
# --------------------------------------------------------------------- networks
|
||||||
networks:
|
networks:
|
||||||
kbnet:
|
kbnet:
|
||||||
@ -26,7 +24,7 @@ x-common-env: &env
|
|||||||
REDIS_HOST: redis
|
REDIS_HOST: redis
|
||||||
REDIS_PORT: 6379
|
REDIS_PORT: 6379
|
||||||
REDIS_DB: 0
|
REDIS_DB: 0
|
||||||
CELERY_BROKER_PASSWORD: ${CELERY_BROKER_PASSWORD}
|
REDIS_PASSWORD: ${REDIS_PASSWORD}
|
||||||
QDRANT_HOST: qdrant
|
QDRANT_HOST: qdrant
|
||||||
DB_HOST: postgres
|
DB_HOST: postgres
|
||||||
DB_PORT: 5432
|
DB_PORT: 5432
|
||||||
@ -107,11 +105,11 @@ services:
|
|||||||
image: redis:7.2-alpine
|
image: redis:7.2-alpine
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
networks: [ kbnet ]
|
networks: [ kbnet ]
|
||||||
command: ["redis-server", "--save", "", "--appendonly", "no", "--requirepass", "${CELERY_BROKER_PASSWORD}"]
|
command: ["redis-server", "--save", "", "--appendonly", "no", "--requirepass", "${REDIS_PASSWORD}"]
|
||||||
volumes:
|
volumes:
|
||||||
- redis_data:/data:rw
|
- redis_data:/data:rw
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: [ "CMD", "redis-cli", "--pass", "${CELERY_BROKER_PASSWORD}", "ping" ]
|
test: [ "CMD", "redis-cli", "--pass", "${REDIS_PASSWORD}", "ping" ]
|
||||||
interval: 15s
|
interval: 15s
|
||||||
timeout: 5s
|
timeout: 5s
|
||||||
retries: 5
|
retries: 5
|
||||||
|
|||||||
@ -128,18 +128,11 @@ def should_process(message: DiscordMessage) -> bool:
|
|||||||
"update_server_summary",
|
"update_server_summary",
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
print("response", response)
|
|
||||||
if not response:
|
if not response:
|
||||||
return False
|
return False
|
||||||
if not (res := re.search(r"<number>(.*)</number>", response)):
|
if not (res := re.search(r"<number>(.*)</number>", response)):
|
||||||
return False
|
return False
|
||||||
try:
|
try:
|
||||||
print(
|
|
||||||
"parsed",
|
|
||||||
int(res.group(1)),
|
|
||||||
message.chattiness_threshold,
|
|
||||||
100 - message.chattiness_threshold,
|
|
||||||
)
|
|
||||||
return int(res.group(1)) > 100 - message.chattiness_threshold
|
return int(res.group(1)) > 100 - message.chattiness_threshold
|
||||||
except ValueError:
|
except ValueError:
|
||||||
return False
|
return False
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user