We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1894517 commit 1f1baf6Copy full SHA for 1f1baf6
app/Console/Commands/QueueUpdates.php
@@ -38,13 +38,22 @@ public function handle(): int
38
39
$this->output->writeln('Pushing update jobs');
40
41
- Site::query()
+ $sites = Site::query()
42
->where(
43
'cms_version',
44
'like',
45
$targetVersion[0] . '%'
46
- )
47
- ->chunkById(
+ );
+
48
+ // Query the amount of sites to be updated
49
+ $updateCount = $this->ask('How many updates will be pushed? - Use 0 for "ALL"', 100);
50
51
+ if ($updateCount > 0) {
52
+ $sites->limit($updateCount);
53
+ }
54
55
+ // Chunk and push to queue
56
+ $sites->chunkById(
57
100,
58
function (Collection $chunk) use ($targetVersion) {
59
// Show progress
0 commit comments