-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Add a UTC date to the marker document and venv/ to the .gitignore #3033
base: master
Are you sure you want to change the base?
Conversation
""" | ||
self.create_marker_index() | ||
self.es.index(index=self.marker_index, doc_type=self.marker_doc_type, | ||
id=self.marker_index_document_id(), body={ | ||
'update_id': self.update_id, | ||
'target_index': self.index, | ||
'target_doc_type': self.doc_type, | ||
'date': datetime.datetime.now()}) | ||
'date': datetime.datetime.now(), | ||
'date_utc': datetime.datetime.utcnow()}) |
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.
Not an expert of ES, so not sure of the impact here.
@@ -169,15 +169,18 @@ def touch(self): | |||
|
|||
The document id would be sufficient but, | |||
for documentation, | |||
we index the parameters `update_id`, `target_index`, `target_doc_type` and `date` as well. | |||
we index the parameters `update_id`, `target_index`, `target_doc_type` and `date` as well. `date_utc` added |
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 think the added comment fits better as a PR comment instead of docstring to track the reasoning. Maybe something as simple as: we index the parameters update_id
, target_index
, target_doc_type
, date
and date_utc
.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If closed, you may revisit when your time allows and reopen! Thank you for your contributions. |
Description
Added an additional field to the marker entry for the ElasticSearch target so we also have the UTC based date.
I also use PyCharm which sets up the local virtual as
venv/
so I wanted to be sure that was ignored as part of .gitignoreMotivation and Context
We use UTC dates to control incremental processes and knowing when this marker was last updated based upon a UTC
date is needed for us.
Have you tested this? If so, how?
I have run "tox -e py39-core test/contrib/esindex_test.py" locally on this change.