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
Rename mapping/es to storage and start using elasticsearch lib #45
base: master
Are you sure you want to change the base?
Conversation
@@ -15,7 +15,8 @@ | |||
], | |||
"backend": { | |||
"elastic": "http://4.3.2.1:9200/", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is probably deprecated in favour of "connection", why not remove this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will remove this one in a following commit in the same branch. Right now there is code, that still uses this
logging.error( | ||
"Got {} error when creating index '{}'.".format( | ||
e, index_to_create)) | ||
sys.exit(1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this normal to immediately break running flask or gunicorn process here? Why not raise some exception instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this function is called from job.py, not from flask
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this code is not planned to be used by wsgi server?
This is actually not a good pattern to terminate python process somewhere deep in code, it is better to raise some exception
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well, I tend to agree with you. I'm coping this from it's prev location, but there's no reason not to improve this part =)
logging.error( | ||
"Got {} error when creating index '{}'.".format( | ||
e, index_to_create)) | ||
sys.exit(1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this code is not planned to be used by wsgi server?
This is actually not a good pattern to terminate python process somewhere deep in code, it is better to raise some exception
This commit renames mapping.es.py to storage.py to unify things with
other projects. This also adds initial usage of elasticsearch library
client and expands config to allow old and new code to coexist.
Closes #42
Related #37