Update to carbon 3

This commit is contained in:
DariusIII
2024-04-26 22:40:03 +02:00
parent 73f445af65
commit 77ee96bb9d
12 changed files with 143 additions and 71 deletions
+9 -9
View File
@@ -236,7 +236,7 @@ class ProcessReleases
}
$count = $countQuery->count('id');
$totalTime = now()->diffInSeconds($startTime);
$totalTime = now()->diffInSeconds($startTime, true);
$this->colorCLI->primary(
($count ?? 0).' collections were found to be complete. Time: '.
@@ -282,7 +282,7 @@ class ProcessReleases
$checked.' collections set to filecheck = 3(size calculated)',
true
);
$totalTime = now()->diffInSeconds($startTime);
$totalTime = now()->diffInSeconds($startTime, true);
$this->colorCLI->primary($totalTime.Str::plural(' second', $totalTime), true);
}
}, 10);
@@ -366,7 +366,7 @@ class ProcessReleases
}
}
$totalTime = now()->diffInSeconds($startTime);
$totalTime = now()->diffInSeconds($startTime, true);
if ($this->echoCLI) {
$this->colorCLI->primary('Deleted '.($minSizeDeleted + $maxSizeDeleted + $minFilesDeleted).' collections: '.PHP_EOL.$minSizeDeleted.' smaller than, '.$maxSizeDeleted.' bigger than, '.$minFilesDeleted.' with less files than site/group settings in: '.$totalTime.Str::plural(' second', $totalTime), true);
@@ -535,7 +535,7 @@ class ProcessReleases
}
}
$totalTime = now()->diffInSeconds($startTime);
$totalTime = now()->diffInSeconds($startTime, true);
if ($this->echoCLI) {
$this->colorCLI->primary(
@@ -587,7 +587,7 @@ class ProcessReleases
}
}
$totalTime = now()->diffInSeconds($startTime);
$totalTime = now()->diffInSeconds($startTime, true);
if ($this->echoCLI) {
$this->colorCLI->primary(
@@ -625,7 +625,7 @@ class ProcessReleases
$groupID
);
$totalTime = now()->diffInSeconds($startTime);
$totalTime = now()->diffInSeconds($startTime, true);
if ($this->echoCLI) {
$this->colorCLI->primary($totalTime.Str::plural(' second', $totalTime));
@@ -682,7 +682,7 @@ class ProcessReleases
}
$firstQuery = $fourthQuery = now();
$totalTime = $firstQuery->diffInSeconds($startTime);
$totalTime = $firstQuery->diffInSeconds($startTime, true);
if ($this->echoCLI) {
$this->colorCLI->primary(
@@ -729,8 +729,8 @@ class ProcessReleases
}
$deletedCount += $deleted;
$colDelTime = now()->diffInSeconds($fourthQuery);
$totalTime = $fourthQuery->diffInSeconds($startTime);
$colDelTime = now()->diffInSeconds($fourthQuery, true);
$totalTime = $fourthQuery->diffInSeconds($startTime, true);
if ($this->echoCLI) {
$this->colorCLI->primary('Finished deleting '.$deleted.' collections missed after NZB creation in '.$colDelTime.Str::plural(' second', $colDelTime).PHP_EOL.'Removed '.number_format($deletedCount).' parts/binaries/collection rows in '.$totalTime.Str::plural(' second', $totalTime), true);