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

1168 automatically set needs to be reindexed based on time since prod or reindexed #1284

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

Kirandawadi
Copy link
Collaborator

Automatic Collection Reindexing

This feature identifies collections that need reindexing based on two scenarios:

1. Previously Reindexed Collections

  • Targets collections with REINDEXING_INDEXED_ON_PROD status
  • Checks their latest ReindexingHistory entry
  • Marks for reindexing if:
    • No reindexing history exists, or
    • Last reindex was more than 2 months ago

2. First-Time Indexed Collections

  • Targets collections with:
    • PROD_PERFECT workflow status and
    • REINDEXING_NOT_NEEDED reindexing status
  • Checks their WorkflowHistory for when they reached PROD_PERFECT
  • Marks for reindexing if:
    • No workflow history exists, or
    • Reached PROD_PERFECT more than 2 months ago

Collections meeting these criteria will be marked as REINDEXING_NEEDED_ON_DEV.

Add configuration setting

  • Add reindexing interval setting to make it easily configurable:
    COLLECTION_REINDEX_INTERVAL_DAYS = 60

Celery Beat Configuration

  • Add daily scheduled task to check collections
  • Task runs automatically without manual intervention

@Kirandawadi
Copy link
Collaborator Author

Demo

set-reindexing-auto.mov

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.

Automatically Set Needs to Be Reindexed Based on Time Since Prod or ReIndexed
1 participant