more refactor
This commit is contained in:
parent
58e99a1869
commit
76c2dedea3
2 changed files with 5 additions and 1 deletions
|
|
@ -11,6 +11,7 @@ from anaxi.config import (
|
|||
)
|
||||
from anaxi.constants import (
|
||||
ASSUMED_PREHISTORICAL_DATETIME,
|
||||
COSMOS_DB_TIMESTAMP_FIELD_KEY,
|
||||
DEFAULT_BATCH_SIZE,
|
||||
DESTINATION_COLUMN_NAME,
|
||||
PATHS,
|
||||
|
|
@ -94,7 +95,9 @@ class SyncJob:
|
|||
|
||||
def commit_batch(self, docs_batch, cursor):
|
||||
self.checkpoint_manager.set_new_goal(
|
||||
goal_timestamp=datetime.datetime.fromtimestamp(docs_batch[-1]["_ts"])
|
||||
goal_timestamp=datetime.datetime.fromtimestamp(
|
||||
docs_batch[-1][COSMOS_DB_TIMESTAMP_FIELD_KEY]
|
||||
)
|
||||
)
|
||||
|
||||
json_data = [(json.dumps(d),) for d in docs_batch]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue