WIP - add FIXMEs to fix progress reporting for records without imported_id

This commit is contained in:
Leonardo Mosquera 2022-11-15 20:59:17 +00:00
parent 1630bb28d9
commit f1a184eaff
No known key found for this signature in database
GPG Key ID: A5174CB390D9E8B1
2 changed files with 5 additions and 0 deletions

View File

@ -773,6 +773,9 @@ class BulkImport::Base
end
end
# FIXME: this does not count succesfully inserted records that do not happen to have an imported_id field,
# which is misguiding and can results in lots of wasted time double checking "0 records imported" prints
if imported_ids.size > 0
print "\r%7d - %6d/sec" % [imported_ids.size, imported_ids.size.to_f / (Time.now - start)]
puts

View File

@ -176,6 +176,7 @@ class BulkImport::Generic < BulkImport::Base
user_id = user_id_from_imported_id(imported_user_id)
added += 1
{
# FIXME: missing imported_id
topic_id: topic_id,
user_id: user_id
}
@ -227,6 +228,7 @@ class BulkImport::Generic < BulkImport::Base
next if @imported_likes.add?([post_id, user_id]).nil?
{
# FIXME: missing imported_id
post_id: post_id_from_imported_id(row["post_id"]),
user_id: user_id_from_imported_id(row["user_id"]),
post_action_type_id: 2,