Skip to content
This repository has been archived by the owner on Jan 5, 2025. It is now read-only.

Commit

Permalink
Add missing files to .gitignore and update Celery configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
codebanesr committed Feb 2, 2024
1 parent a7af664 commit 5254af8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ yarn-error.log

test.html
.aider*
logs
12 changes: 5 additions & 7 deletions llm-server/celery_app.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
import os
from celery import Celery
from shared.models.opencopilot_db import create_database_schema
from dotenv import load_dotenv

import os
load_dotenv()

create_database_schema()
app = Celery(
'opencopilot_celery',
broker=os.getenv("CELERY_BROKER", 'redis://redis:6379/0'),
backend=os.getenv("CELERY_BACKEND",'redis://redis:6379/1')
"opencopilot_celery",
broker=os.getenv("CELERY_BROKER", "redis://redis:6379/0"),
backend=os.getenv("CELERY_BACKEND", "redis://redis:6379/1"),
)

app.conf.imports = ('workers.tasks',)
app.conf.imports = ("workers.tasks",)
3 changes: 3 additions & 0 deletions llm-server/shared/models/opencopilot_db/database_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
from sqlalchemy.pool import QueuePool
from sqlalchemy.ext.declarative import declarative_base # Import declarative_base
from utils.llm_consts import get_mysql_uri
from dotenv import load_dotenv

load_dotenv()

# Replace these values with your MySQL server details
db_url = get_mysql_uri()
Expand Down

0 comments on commit 5254af8

Please sign in to comment.