Add worker process for CSV import jobs

This commit is contained in:
Eli Ribble 2026-02-08 03:52:39 +00:00
parent f81f8def1c
commit d17c8b8be7
No known key found for this signature in database
2 changed files with 48 additions and 3 deletions

View file

@ -13,9 +13,10 @@ var waitGroup sync.WaitGroup
func Start(ctx context.Context) {
newOAuthTokenChannel = make(chan struct{}, 10)
channelJobAudio = make(chan jobAudio, 100) // Buffered channel to prevent blocking
channelJobEmail = make(chan email.Job, 100) // Buffered channel to prevent blocking
channelJobText = make(chan text.Job, 100) // Buffered channel to prevent blocking
channelJobAudio = make(chan jobAudio, 100) // Buffered channel to prevent blocking
channelJobImportCSVPool = make(chan jobImportCSVPool, 100) // Buffered channel to prevent blocking
channelJobEmail = make(chan email.Job, 100) // Buffered channel to prevent blocking
channelJobText = make(chan text.Job, 100) // Buffered channel to prevent blocking
waitGroup.Add(1)
go func() {
@ -29,6 +30,12 @@ func Start(ctx context.Context) {
startWorkerAudio(ctx, channelJobAudio)
}()
waitGroup.Add(1)
go func() {
defer waitGroup.Done()
startWorkerCSV(ctx, channelJobImportCSVPool)
}()
waitGroup.Add(1)
go func() {
defer waitGroup.Done()