update see calss
This commit is contained in:
@@ -11,6 +11,7 @@ import (
|
||||
"syscall"
|
||||
"time"
|
||||
|
||||
"github.com/descrybe/descrybe-v2/apps/api/internal/aiaudit"
|
||||
"github.com/descrybe/descrybe-v2/apps/api/internal/aiprompts"
|
||||
"github.com/descrybe/descrybe-v2/apps/api/internal/aiprovider"
|
||||
"github.com/descrybe/descrybe-v2/apps/api/internal/billing"
|
||||
@@ -95,6 +96,9 @@ func main() {
|
||||
ProcessingMaxRetries: cfg.ProcessingMaxRetries,
|
||||
})
|
||||
aiSvc.Platform = platSettings
|
||||
// Full prompt/response capture for /admin/ai-calls (pruned after
|
||||
// aiaudit.RetentionDays by the retention tick below).
|
||||
aiSvc.WithAudit(aiaudit.NewRecorder(pool))
|
||||
|
||||
pipeline := processing.NewPipeline(pool)
|
||||
pipeline.BatchSize = cfg.ProcessingBatchSize
|
||||
@@ -371,6 +375,11 @@ func main() {
|
||||
} else if res.JobsDeleted > 0 {
|
||||
log.Printf("retention cleanup jobs_deleted=%d", res.JobsDeleted)
|
||||
}
|
||||
if n, err := aiaudit.CleanupExpired(ctx, pool); err != nil {
|
||||
log.Printf("worker: ai call log cleanup: %v", err)
|
||||
} else if n > 0 {
|
||||
log.Printf("worker: ai call log cleanup removed=%d older_than_days=%d", n, aiaudit.RetentionDays)
|
||||
}
|
||||
if res, err := processing.CleanupExpiredSyncJobs(ctx, pool); err != nil {
|
||||
log.Printf("expired sync cleanup: %v", err)
|
||||
} else if res.SyncJobsDeleted > 0 {
|
||||
|
||||
Reference in New Issue
Block a user