nidus-sync/queue/audio_processing.go
Eli Ribble 842e6cff43
Move comms work to background goroutine
This is a sort of random checkpoint of work
 * add schema for tracking messages sent to DB
 * add terms of service and privacy policy for RCS compliance
 * standardize some things about background workers
 * update some missing stuff from generated DB code
2026-01-20 17:10:22 +00:00

23 lines
546 B
Go

package queue
import (
"github.com/google/uuid"
"github.com/rs/zerolog/log"
)
// AudioJob represents a job to process an audio file.
type JobAudio struct {
AudioUUID uuid.UUID
}
var ChannelJobAudio chan JobAudio
// EnqueueAudioJob sends an audio processing job to the worker.
func EnqueueAudioJob(job JobAudio) {
select {
case ChannelJobAudio <- job:
log.Info().Str("uuid", job.AudioUUID.String()).Msg("Enqueued audio job")
default:
log.Warn().Str("uuid", job.AudioUUID.String()).Msg("Audio job channel is full, dropping job")
}
}