Skip to content

Commit

Permalink
rename transcription output queue url config field
Browse files Browse the repository at this point in the history
  • Loading branch information
marjisound committed Oct 2, 2024
1 parent a9cb6d1 commit 9e20507
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions backend/app/extraction/ExternalTranscriptionWorker.scala
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ class ExternalTranscriptionWorker(manifest: WorkerManifest, amazonSQSClient: Ama

def pollForResults(): Int = {
val messages = amazonSQSClient.receiveMessage(
new ReceiveMessageRequest(transcribeConfig.transcriptionServiceOutputQueueUrl).withMaxNumberOfMessages(10)
new ReceiveMessageRequest(transcribeConfig.transcriptionOutputQueueUrl).withMaxNumberOfMessages(10)
).getMessages

if (messages.size() > 0) logger.info(s"retrieved ${messages.size()} messages from queue ${transcribeConfig.transcriptionServiceOutputQueueUrl}")
if (messages.size() > 0) logger.info(s"retrieved ${messages.size()} messages from queue ${transcribeConfig.transcriptionOutputQueueUrl}")

messages.asScala.toList.foldLeft(0) { (completed, message) =>
val result = for {
Expand All @@ -34,7 +34,7 @@ class ExternalTranscriptionWorker(manifest: WorkerManifest, amazonSQSClient: Ama
_ <- markAsComplete(transcriptionOutput.id, "ExternalTranscriptionExtractor")
} yield {
amazonSQSClient.deleteMessage(
new DeleteMessageRequest(transcribeConfig.transcriptionServiceOutputQueueUrl, message.getReceiptHandle)
new DeleteMessageRequest(transcribeConfig.transcriptionOutputQueueUrl, message.getReceiptHandle)
)
logger.debug(s"deleted message for ${transcriptionOutput.id}")
}
Expand Down
6 changes: 3 additions & 3 deletions backend/app/services/Config.scala
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ case class OcrConfig(
)

case class TranscribeConfig(
whisperModelFilename: String,
transcriptionServiceQueueUrl: String,
transcriptionServiceOutputQueueUrl: String
whisperModelFilename: String,
transcriptionServiceQueueUrl: String,
transcriptionOutputQueueUrl: String
)

case class WorkerConfig(
Expand Down
2 changes: 1 addition & 1 deletion backend/app/utils/AwsDiscovery.scala
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ object AwsDiscovery extends Logging {
}.getOrElse(config.worker),
transcribe = config.transcribe.copy(
whisperModelFilename = readSSMParameter("transcribe/modelFilename", stack, stage, ssmClient),
transcriptionServiceOutputQueueUrl = readSSMParameter("transcribe/transcriptionServiceOutputQueueUrl", stack, stage, ssmClient),
transcriptionOutputQueueUrl = readSSMParameter("transcribe/transcriptionOutputQueueUrl", stack, stage, ssmClient),
transcriptionServiceQueueUrl = readSSMParameter("transcribe/transcriptionServiceQueueUrl", stack, stage, ssmClient)
),
underlying = config.underlying
Expand Down
2 changes: 1 addition & 1 deletion backend/conf/application.conf
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ ocr {
transcribe {
whisperModelFilename = "ggml-base.bin"
transcriptionServiceQueueUrl = "http://sqs.eu-west-1.localhost.localstack.cloud:4566/000000000000/transcription-service-task-queue-DEV.fifo"
transcriptionServiceOutputQueueUrl = "http://sqs.eu-west-1.localhost.localstack.cloud:4566/000000000000/giant-output-queue-DEV"
transcriptionOutputQueueUrl = "http://sqs.eu-west-1.localhost.localstack.cloud:4566/000000000000/giant-output-queue-DEV"
}

sqs {
Expand Down

0 comments on commit 9e20507

Please sign in to comment.