Skip to content

Commit

Permalink
remove data assertion from migration script to speed up
Browse files Browse the repository at this point in the history
  • Loading branch information
sywhb committed Oct 10, 2023
1 parent 768845e commit dc14743
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/db/elastic_migrations/migrate_from_elastic.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ async def main():
ES_USERNAME, ES_PASSWORD), retry_on_timeout=True)

try:
updated_user_ids = []
# updated_user_ids = []

print(await es_client.info())

Expand Down Expand Up @@ -454,8 +454,8 @@ async def main():
library_items.append(library_item)
library_items_original_ids.append(doc_id)

if user_id not in updated_user_ids:
updated_user_ids.append(user_id)
# if user_id not in updated_user_ids:
# updated_user_ids.append(user_id)

# convert labels to postgres format
if 'labels' in source:
Expand Down Expand Up @@ -551,7 +551,7 @@ async def main():

print('Migration complete', END_TIME)

await assert_data(db_conn, es_client, updated_user_ids, uploaded_files)
# await assert_data(db_conn, es_client, updated_user_ids, uploaded_files)
except Exception as err:
print('Migration error', err)
finally:
Expand Down

0 comments on commit dc14743

Please sign in to comment.