Skip to content

Commit

Permalink
feat: CLI relay all messages, not just the first 100 (#121)
Browse files Browse the repository at this point in the history
  • Loading branch information
priyadi authored Jan 4, 2025
1 parent 55e0670 commit e11fce2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* chore: static analysis fix
* fix: change outbox primary key to bigint
* feat: also listen to `WorkerMessageHandledEvent` for relaying messages
* feat: CLI relay all messages, not just the first 100

## 2.5.0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ protected function execute(InputInterface $input, OutputInterface $output): int
throw new \InvalidArgumentException('The manager name must be a string.');
}

$this->messageRelay->relayMessages($managerName);
do {
$messagesRelayed = $this->messageRelay->relayMessages($managerName);
} while ($messagesRelayed > 0);

return Command::SUCCESS;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ public function relayAll(): void
$managerNames = $this->managerRegistry->getManagerNames();

foreach ($managerNames as $managerName => $serviceId) {
$this->messageRelay->relayMessages($managerName);
do {
$messagesRelayed = $this->messageRelay->relayMessages($managerName);
} while ($messagesRelayed > 0);
}
}
}

0 comments on commit e11fce2

Please sign in to comment.