Skip to content

Permit SQS messages and correct message body format#83

Merged
codycooperross merged 2 commits intomainfrom
doi-reindex-fix
Mar 12, 2026
Merged

Permit SQS messages and correct message body format#83
codycooperross merged 2 commits intomainfrom
doi-reindex-fix

Conversation

@codycooperross
Copy link
Contributor

@codycooperross codycooperross commented Mar 11, 2026

Purpose

closes: Add github issue that originated this PR

Approach

Open Questions and Pre-Merge TODOs

Learning

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

  • New feature (non-breaking change which adds functionality)

  • Breaking change (fix or feature that would cause existing functionality to change)

Reviewer, please remember our guidelines:

  • Be humble in the language and feedback you give, ask don't tell.
  • Consider using positive language as opposed to neutral when offering feedback. This is to avoid the negative bias that can occur with neutral language appearing negative.
  • Offer suggestions on how to improve code e.g. simplification or expanding clarity.
  • Ensure you give reasons for the changes you are proposing.

Summary by CodeRabbit

  • Refactor
    • Message dispatch for indexing is now active and performed in parallel for processed items, improving throughput during data synchronization.
    • This reduces overall synchronization time and speeds up delivery of indexing updates without changing public interfaces.

@coderabbitai
Copy link

coderabbitai bot commented Mar 11, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 0aeadea9-5f0c-4eaf-851c-d52d7f6fee96

📥 Commits

Reviewing files that changed from the base of the PR and between ac6aa0e and 7de48a6.

📒 Files selected for processing (1)
  • app/models/event.rb
🚧 Files skipped from review as they are similar to previous changes (1)
  • app/models/event.rb

📝 Walkthrough

Walkthrough

The Event.reindex_touched_dois method re-enables parallel SQS indexing: it now iterates DOIs with Parallel.each and calls SqsUtilities.send_events_doi_index_message with a single-key hash { doi: doi } for each DOI instead of skipping the SQS dispatch.

Changes

Cohort / File(s) Summary
SQS Indexing Activation
app/models/event.rb
Uncommented and activated parallel SQS indexing logic in reindex_touched_dois. Iterates DOIs with Parallel.each and sends each as a hash argument { doi: doi } to SqsUtilities.send_events_doi_index_message, changing the message payload shape and enabling concurrent dispatch.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Permit SQS messages and correct message body format' accurately reflects the main changes: enabling SQS messaging (previously commented-out code is now active) and correcting the message format (changing from raw DOI to a single-key hash).

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch doi-reindex-fix

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

2 participants