Skip to content

Add es_os_refresh env var to refresh index, ensure refresh passed via kwargs #370

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

Merged
merged 15 commits into from
May 10, 2025

Conversation

jonhealy1
Copy link
Collaborator

@jonhealy1 jonhealy1 commented May 7, 2025

Related Issue(s):

Description:

  • Introduced the DATABASE_REFRESH environment variable to control whether database operations refresh the index immediately after changes. If set to true, changes will be immediately searchable. If set to false, changes may not be immediately visible but can improve performance for bulk operations. If set to wait_for, changes will wait for the next refresh cycle to become visible.
  • Refactored CRUD methods in TransactionsClient to use the _resolve_refresh helper method for consistent and reusable handling of the refresh parameter.
  • Fixed an issue where some routes were not passing the refresh parameter from kwargs to the database logic, ensuring consistent behavior across all CRUD operations.

PR Checklist:

  • Code is formatted and linted (run pre-commit run --all-files)
  • Tests pass (run make test)
  • Documentation has been updated to reflect changes, if applicable
  • Changes are added to the changelog

@jonhealy1 jonhealy1 changed the title Add es_os_refresh env var to refresh index Add es_os_refresh env var to refresh index, ensure refresh passed via kwargs May 7, 2025
@jonhealy1 jonhealy1 marked this pull request as ready for review May 7, 2025 11:59
@jonhealy1 jonhealy1 marked this pull request as draft May 8, 2025 02:57
@jonhealy1 jonhealy1 marked this pull request as ready for review May 8, 2025 12:09
rhysrevans3
rhysrevans3 previously approved these changes May 9, 2025
Copy link
Collaborator

@rhysrevans3 rhysrevans3 left a comment

Choose a reason for hiding this comment

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

Looks good just one optional change 👍

@jonhealy1 jonhealy1 merged commit f3ac7da into main May 10, 2025
15 checks passed
@jonhealy1 jonhealy1 deleted the es-os-fresh branch May 10, 2025 04:00
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