TT-003: complete request-module integration into modular platform
- integrated request-module into module registry - moved backend into modules/request-module - added manifest.json and module.py - implemented dynamic router mounting - implemented dynamic static mounting - removed direct dependencies from platform core - verified startup with request-module - verified startup without request-module - added implementation_report_003.md
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
from app.core.database import SessionLocal
|
||||
from app.models.email_message import EmailMessage
|
||||
from app.models.ticket import Ticket
|
||||
|
||||
db = SessionLocal()
|
||||
|
||||
# Check ticket ID mapping
|
||||
tickets = db.query(Ticket).order_by(Ticket.id).limit(10).all()
|
||||
print('First 10 tickets:')
|
||||
for t in tickets:
|
||||
print(f' ID {t.id}: {t.subject[:50] if t.subject else "no subject"}')
|
||||
|
||||
# Check email ticket IDs
|
||||
emails = db.query(EmailMessage).order_by(EmailMessage.ticket_id).limit(10).all()
|
||||
print('\nFirst 10 emails by ticket_id:')
|
||||
for e in emails:
|
||||
print(f' ticket_id={e.ticket_id}, direction={e.direction}')
|
||||
|
||||
# Check distinct ticket IDs in emails
|
||||
from sqlalchemy import distinct
|
||||
email_ticket_ids = db.query(distinct(EmailMessage.ticket_id)).order_by(EmailMessage.ticket_id).limit(20).all()
|
||||
print(f'\nDistinct ticket IDs in emails (first 20):')
|
||||
for row in email_ticket_ids:
|
||||
print(f' {row[0]}')
|
||||
|
||||
db.close()
|
||||
Reference in New Issue
Block a user