mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
fix: improve migration loop
This commit is contained in:
@@ -51,7 +51,7 @@ $cli
|
||||
$class = 'Appwrite\\Migration\\Version\\' . Migration::$versions[$version];
|
||||
$migration = new $class();
|
||||
|
||||
while ($sum > 0) {
|
||||
while (!empty($projects)) {
|
||||
foreach ($projects as $project) {
|
||||
try {
|
||||
$migration
|
||||
@@ -69,9 +69,7 @@ $cli
|
||||
$offset = $offset + $limit;
|
||||
$count = $count + $sum;
|
||||
|
||||
if ($sum > 0) {
|
||||
Console::log('Migrated ' . $count . '/' . $totalProjects . ' projects...');
|
||||
}
|
||||
Console::log('Migrated ' . $count . '/' . $totalProjects . ' projects...');
|
||||
}
|
||||
|
||||
Swoole\Event::wait(); // Wait for Coroutines to finish
|
||||
|
||||
Reference in New Issue
Block a user