This commit is contained in:
2023-09-30 19:56:58 +08:00
parent bc43a32b10
commit 4cac66b1d1
+2 -5
View File
@@ -63,12 +63,8 @@ class ImplodeCommand extends Command
} }
$waite = new Coroutine\WaitGroup(); $waite = new Coroutine\WaitGroup();
$stream = fopen($path, 'r'); $stream = fopen($path, 'r');
if (!$stream) { if ($stream) {
return 0;
}
while (($line = fgets($stream)) !== false) { while (($line = fgets($stream)) !== false) {
$insert = html_entity_decode($line); $insert = html_entity_decode($line);
if (!str_starts_with(strtoupper($insert), 'INSERT INTO')) { if (!str_starts_with(strtoupper($insert), 'INSERT INTO')) {
@@ -81,6 +77,7 @@ class ImplodeCommand extends Command
}); });
} }
fclose($stream); fclose($stream);
}
$waite->wait(); $waite->wait();
$output->write('dump data success'); $output->write('dump data success');