fix: avoid main call timeout dependency
This commit is contained in:
@@ -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=?
|
||||
|
||||
Reference in New Issue
Block a user