Implement data integration tasks with Celery, including periodic fetching and manual refresh of chat data; add utility functions for data processing and transcript handling; create views and URLs for manual data refresh; establish Redis and Celery configuration; enhance error handling and logging; introduce scripts for data cleanup and fixing dashboard data; update documentation for Redis and Celery setup and troubleshooting.

This commit is contained in:
2025-05-18 13:33:11 +00:00
parent e8f2d2adc2
commit 8bbbb109bd
63 changed files with 4601 additions and 164 deletions

36
start.sh Executable file
View File

@ -0,0 +1,36 @@
#!/bin/bash
# Set UV_LINK_MODE to copy to avoid hardlink warnings
export UV_LINK_MODE=copy
# Check if Redis is running
if ! redis-cli ping >/dev/null 2>&1; then
echo "Starting Redis server..."
redis-server --daemonize yes
sleep 1
# Verify Redis is now running
if redis-cli ping >/dev/null 2>&1; then
echo "✅ Redis server is now running"
else
echo "❌ Failed to start Redis server"
echo "Falling back to SQLite for Celery"
export CELERY_BROKER_URL=sqla+sqlite:///dashboard_project/celery.sqlite
export CELERY_RESULT_BACKEND=db+sqlite:///dashboard_project/results.sqlite
fi
else
echo "✅ Redis server is already running"
fi
# Set environment variables for Redis if it's running
if redis-cli ping >/dev/null 2>&1; then
export CELERY_BROKER_URL=redis://localhost:6379/0
export CELERY_RESULT_BACKEND=redis://localhost:6379/0
echo "Using Redis for Celery broker and result backend"
else
export CELERY_BROKER_URL=sqla+sqlite:///dashboard_project/celery.sqlite
export CELERY_RESULT_BACKEND=db+sqlite:///dashboard_project/results.sqlite
echo "Using SQLite for Celery broker and result backend"
fi
# Start the application using foreman
foreman start