[scripts] Fix item import script (#5152)
Build / Linux (push) Waiting to run
Build / Windows (push) Waiting to run

This commit is contained in:
JJ authored and GitHub committed 2026-12-01 18:43:33 -08:00
1 parent 1d9cb5c7cc
commit 57a09d4efc
1 file changed
+8 -2
+8 -2
View File
@@ -104,7 +104,7 @@ sub read_items_file_from_13th_floor_text {
$query_insert_ph .= "), ";
#::: Let's chunk our updates so we can break up the amount of individual queries
if($query_count > 500){
if ($query_count > 500){
$query_insert_ph = substr($query_insert_ph, 0, -2);
$dbh->prepare($master_insert . " " . $query_insert_ph)->execute(@field_values);
$query_count = 0;
@@ -113,7 +113,7 @@ sub read_items_file_from_13th_floor_text {
}
#::: Print updates to console
if($print_cycle > 25){
if ($print_cycle > 25){
print "Processing (" . $read_items_file . ") :: (Items: " . $total_items . "/" . $total_items_file . ") \r";
$print_cycle = 0;
}
@@ -124,6 +124,12 @@ sub read_items_file_from_13th_floor_text {
$print_cycle++;
}
#::: Process remaining items that didn't fill a complete batch
if ($query_count > 0) {
$query_insert_ph = substr($query_insert_ph, 0, -2);
$dbh->prepare($master_insert . " " . $query_insert_ph)->execute(@field_values);
}
#::: One last processing print
print "Processing (" . $read_items_file . ") :: (Items: " . $total_items . "/" . $total_items_file . ") \r";