mirror of
https://github.com/thecyberlearn/quantum-ai-v2.git
synced 2026-08-18 10:13:00 +00:00
- Add expires_at field to ChatSession model with 2-hour default - Sessions automatically expire after 2 hours of inactivity - Active conversations extend session by 2 hours per message - Add session expiration checks in chat views - Create cleanup management command for expired sessions - Add session status indicators in chat UI - Fix null safety for existing sessions without expiration 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
41 lines
1.1 KiB
Python
41 lines
1.1 KiB
Python
# Generated by Django 5.2.4 on 2025-08-01 10:08
|
|
|
|
from django.db import migrations, models
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
(
|
|
"agents",
|
|
"0002_agent_agent_type_alter_agent_form_schema_chatsession_and_more",
|
|
),
|
|
]
|
|
|
|
operations = [
|
|
migrations.AddField(
|
|
model_name="chatsession",
|
|
name="expires_at",
|
|
field=models.DateTimeField(
|
|
blank=True,
|
|
help_text="Session expiration time (2 hours from last activity)",
|
|
null=True,
|
|
),
|
|
),
|
|
migrations.AlterField(
|
|
model_name="chatsession",
|
|
name="status",
|
|
field=models.CharField(
|
|
choices=[
|
|
("active", "Active"),
|
|
("completed", "Completed"),
|
|
("expired", "Expired"),
|
|
("abandoned", "Abandoned"),
|
|
("failed", "Failed"),
|
|
],
|
|
default="active",
|
|
max_length=20,
|
|
),
|
|
),
|
|
]
|