-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
changes server and worker #80
Changes from 49 commits
63d84a0
204ad4f
e100dd2
f890047
37e4733
2630edb
9d48fcc
8bcecb9
cda1315
b3a90e5
0a5ef7c
9726f9d
77576ad
c1f61c8
75e784c
cfbf9f7
7bb0979
d2fb665
397164f
f206fad
375cd23
d857289
eae7999
e23dcad
6c2d75b
3e43510
6de2522
d79e553
769a75d
146fa37
e47cc7f
0ecd970
ed3bd01
b0f1533
0974900
dd2e9f8
df24bfb
f1b0cf9
337a386
622f64d
7ce28ab
34dac4f
3b3814b
9621d44
00d1369
2b7dec7
10e08d3
1eb0355
d565495
50d95e8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
--- | ||
|
||
name: Production CI/CD Pipeline | ||
|
||
on: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
--- | ||
|
||
name: Staging CI/CD Pipeline | ||
|
||
on: pull_request | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,6 +50,7 @@ coverage.xml | |
.hypothesis/ | ||
.pytest_cache/ | ||
cover/ | ||
coverage/ | ||
|
||
# Translations | ||
*.mo | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
rules: | ||
brackets: | ||
forbid: false | ||
min-spaces-inside: 1 | ||
max-spaces-inside: 1 | ||
min-spaces-inside-empty: -1 | ||
max-spaces-inside-empty: -1 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,13 @@ | ||
version: "3.9" | ||
--- | ||
|
||
services: | ||
server: | ||
build: | ||
context: . | ||
target: prod | ||
dockerfile: Dockerfile | ||
command: python3 server.py | ||
worker: | ||
build: | ||
context: . | ||
target: prod | ||
dockerfile: Dockerfile | ||
command: python3 worker.py |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -1,4 +1,4 @@ | ||||||
version: "3.9" | ||||||
--- | ||||||
|
||||||
services: | ||||||
app: | ||||||
|
@@ -55,7 +55,7 @@ services: | |||||
- NEO4J_PLUGINS=["apoc", "graph-data-science"] | ||||||
- NEO4J_dbms_security_procedures_unrestricted=apoc.*,gds.* | ||||||
healthcheck: | ||||||
test: ["CMD", "wget", "http://localhost:7474"] | ||||||
test: [ "CMD", "wget", "http://localhost:7474" ] | ||||||
interval: 1m30s | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Check the health check command for Neo4j. The health check uses - test: [ "CMD", "wget", "http://localhost:7474" ]
+ test: [ "CMD", "wget", "--spider", "http://localhost:7474" ] Committable suggestion
Suggested change
|
||||||
timeout: 10s | ||||||
retries: 2 | ||||||
|
@@ -77,7 +77,7 @@ services: | |||||
- POSTGRES_USER=root | ||||||
- POSTGRES_PASSWORD=pass | ||||||
healthcheck: | ||||||
test: ["CMD-SHELL", "pg_isready"] | ||||||
test: [ "CMD-SHELL", "pg_isready" ] | ||||||
interval: 10s | ||||||
timeout: 5s | ||||||
retries: 5 | ||||||
|
@@ -105,12 +105,17 @@ services: | |||||
qdrant-healthcheck: | ||||||
restart: always | ||||||
image: curlimages/curl:latest | ||||||
entrypoint: ["/bin/sh", "-c", "--", "while true; do sleep 30; done;"] | ||||||
entrypoint: | ||||||
[ | ||||||
"/bin/sh", | ||||||
"-c", | ||||||
"--", | ||||||
"while true; do sleep 30; done;" | ||||||
] | ||||||
depends_on: | ||||||
- qdrant | ||||||
healthcheck: | ||||||
test: ["CMD", "curl", "-f", "http://qdrant:6333/readyz"] | ||||||
test: [ "CMD", "curl", "-f", "http://qdrant:6333/readyz" ] | ||||||
interval: 10s | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Optimize the health check command for Qdrant. The health check command for Qdrant uses - test: [ "CMD", "curl", "-f", "http://qdrant:6333/readyz" ]
+ test: [ "CMD", "curl", "-f", "--retry 5", "http://qdrant:6333/readyz" ] Committable suggestion
Suggested change
|
||||||
timeout: 2s | ||||||
retries: 5 | ||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import logging | ||
import os | ||
|
||
from dotenv import load_dotenv | ||
from traceloop.sdk import Traceloop | ||
|
||
load_dotenv() | ||
|
||
|
||
def init_tracing(): | ||
otel_endpoint = os.getenv("TRACELOOP_BASE_URL") | ||
if not otel_endpoint: | ||
logging.error("TRACELOOP_BASE_URL is not set.") | ||
return | ||
Traceloop.init(app_name="hivemind-worker", api_endpoint=otel_endpoint) | ||
logging.info("Traceloop initialized.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update to CMD instruction needs correction.
The CMD instruction has been updated to
"celery", "-A", "worker", "worker", "-l", "INFO"
. However, based on the summary, it seems the intention was to use"celery", "-A", "tasks", "worker", "-l", "INFO"
.Committable suggestion