Skip to content

Commit

Permalink
use StoppableWorkers when calling ChangeStreamManager()
Browse files Browse the repository at this point in the history
  • Loading branch information
bashar-515 committed Jan 22, 2025
1 parent 3a5e3c7 commit cc4887d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions rpc/wrtc_call_queue_mongodb.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,11 +215,11 @@ func NewMongoDBWebRTCCallQueue(
activeAnswerersfunc: &activeAnswerersfunc,
}

queue.activeBackgroundWorkers.Add(2) // TODO(RSDK-866): remove
queue.activeBackgroundWorkers.Add(1) // TODO(RSDK-866): remove
utils.ManagedGo(queue.operatorLivenessLoop, queue.activeBackgroundWorkers.Done) // TODO(RSDK-866): remove
utils.ManagedGo(queue.changeStreamManager, queue.activeBackgroundWorkers.Done) // TODO(RSDK-866): remove
//utils.ManagedGo(queue.changeStreamManager, queue.activeBackgroundWorkers.Done) // TODO(RSDK-866): remove
// queue.activeStoppableWorkers.Add(func(ctx context.Context) { queue.operatorLivenessLoop() })
// queue.activeStoppableWorkers.Add(func(ctx context.Context) { queue.changeStreamManager() })
queue.activeStoppableWorkers.Add(func(ctx context.Context) { queue.changeStreamManager() })

// wait for change stream to startup once before we start processing anything
// since we need good track of resume tokens / cluster times initially
Expand Down

0 comments on commit cc4887d

Please sign in to comment.