fix: avoid main call timeout dependency

This commit is contained in:
richjohnrambo
2026-09-14 12:18:05 +08:00
parent 789e662bdb
commit 6f8933c35a
+1 -5
View File
@@ -2791,11 +2791,7 @@ func (a *adapter) TenantCallList(id t.TenantID, uid t.Uid, topic, cursor string,
func (a *adapter) finalizeStaleCalls(ctx context.Context) error {
now := t.TimeNow()
startedTimeout := imCallTimeoutSeconds()
if startedTimeout <= 0 {
startedTimeout = defaultCallEstablishmentTimeout
}
startedBefore := now.Add(-time.Duration(startedTimeout) * time.Second)
startedBefore := now.Add(-30 * time.Second)
acceptedBefore := now.Add(-12 * time.Hour)
if _, err := a.db.ExecContext(ctx, `UPDATE im_call_records
SET status=?,end_reason=?,duration_ms=0,finished_at=?,updated_at=?