mirror of
https://github.com/thecyberlearn/quantum-ai-v3.git
synced 2026-08-18 16:32:57 +00:00
🔧 Add simple agent fix command for Railway deployment
• Create minimal management command to fix agent values • Fix CyberSec Career Navigator: 12 AED → 0 AED • Fix 5 Whys agent: 50 messages → 20 messages, ensure 15 AED • Add to Railway deployment process for automatic fix • Simplest possible solution - runs on every deploy 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
fa29584d90
commit
be6a04c60b
14
core/management/commands/fix_agents.py
Normal file
14
core/management/commands/fix_agents.py
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
from django.core.management.base import BaseCommand
|
||||||
|
from agents.models import Agent
|
||||||
|
|
||||||
|
class Command(BaseCommand):
|
||||||
|
help = 'Fix agent prices and message limits'
|
||||||
|
|
||||||
|
def handle(self, *args, **options):
|
||||||
|
# Fix CyberSec Career Navigator
|
||||||
|
Agent.objects.filter(slug='cybersec-career-navigator').update(price=0.0)
|
||||||
|
|
||||||
|
# Fix 5 Whys agent
|
||||||
|
Agent.objects.filter(slug='5-whys-analyzer').update(price=15.0, message_limit=20)
|
||||||
|
|
||||||
|
self.stdout.write(self.style.SUCCESS('✅ Agents fixed!'))
|
||||||
@ -4,7 +4,7 @@
|
|||||||
"builder": "NIXPACKS"
|
"builder": "NIXPACKS"
|
||||||
},
|
},
|
||||||
"deploy": {
|
"deploy": {
|
||||||
"startCommand": "python manage.py migrate --run-syncdb; python manage.py populate_agents; python manage.py reset_admin; python manage.py verify_email admin@quantumtaskai.com --force || true; python manage.py collectstatic --noinput && gunicorn netcop_hub.wsgi:application --bind 0.0.0.0:$PORT --workers 1 --timeout 60",
|
"startCommand": "python manage.py migrate --run-syncdb; python manage.py populate_agents; python manage.py fix_agents; python manage.py reset_admin; python manage.py verify_email admin@quantumtaskai.com --force || true; python manage.py collectstatic --noinput && gunicorn netcop_hub.wsgi:application --bind 0.0.0.0:$PORT --workers 1 --timeout 60",
|
||||||
"restartPolicyType": "ON_FAILURE",
|
"restartPolicyType": "ON_FAILURE",
|
||||||
"restartPolicyMaxRetries": 3
|
"restartPolicyMaxRetries": 3
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user