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

moved search.py outside of module ./apprentice/app/main/search into .… #28

Merged
merged 7 commits into from
Nov 1, 2020

Conversation

ll-O-ll
Copy link
Contributor

@ll-O-ll ll-O-ll commented Oct 31, 2020

  • Solved issue of importing from ./apprentice/app/main/search.
  • Flask complains that it is a relative path
  • Moved single file outside to path/to/search module to keep things simple
  • In the future, if multiple files are needed under a single directory (module) maybe look into how Flask Blueprints work

ll-O-ll and others added 7 commits October 31, 2020 17:29
- Fetch elasticsearch connection from the current context-global at the time of search
  - Previously we relied on whatever the value was at the time of import
  - Issue with this is that the app may not be initialized at the time (e.g. flask shell), or we may be using another instance of the app (e.g. behind a load balancer in the future)
- Docstring comment for attribution was showing up as the test name, so changed those to line comments
- Elasticsearch was printing shard health warnings (not errors) due to the tests running right as it woke up, but adding a small wait fixes that
Copy link
Contributor

@arefeena arefeena left a comment

Choose a reason for hiding this comment

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

Approved

image

@arefeena arefeena merged commit c54f225 into develop Nov 1, 2020
@ll-O-ll ll-O-ll deleted the fix-search-import branch November 2, 2020 02:05
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