Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adjust job-id params and namespace for sending files to s3 #1373

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

peetucket
Copy link
Member

Why was this change made? 🤔

Fixes #1371 - job id is now druid-version and so is the place where we put the files in S3 bucket

How was this change tested? 🤨

Spec

@cocina_object = cocina_object
@workflow_context = workflow_context
@bare_druid = cocina_object.externalIdentifier.delete_prefix('druid:')
@logger = logger || Logger.new($stdout)
end
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this class never uses the logger, so remove for now unless we specifically need it later (it came as copypasta from the similar Ocr class)

end
end

private

def sttable_filenames
Dor::TextExtraction::SpeechToText.new(cocina_object:, workflow_context: workflow.context).filenames_to_stt
Dor::TextExtraction::SpeechToText.new(cocina_object:).filenames_to_stt
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the filenames_to_stt method doesn't need workflow_context so don't bother passing it in

@@ -27,8 +27,7 @@ def perform_work
def send_sqs_message
message_body = {
id: job_id,
druid:,
media:
druid:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

leaving the druid in the job message (even though it happens to be included in the job_id now) ... maybe useful for logging or other purposes to have it distinct

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SQS Job Id should be druid-version pair
1 participant