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

Add a UTC date to the marker document and venv/ to the .gitignore #3033

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ptindall
Copy link

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 .gitignore

Motivation 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.

"""
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()})
Copy link
Member

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
Copy link
Member

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.

@stale
Copy link

stale bot commented Jan 9, 2022

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.

@stale stale bot added the wontfix label Jan 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants