diff --git a/src/Lifecycle/Broker.php b/src/Lifecycle/Broker.php index 10fccbd0..7300fd74 100644 --- a/src/Lifecycle/Broker.php +++ b/src/Lifecycle/Broker.php @@ -37,10 +37,10 @@ public function fire(Event $event): ?Event $states->each(fn ($state) => $this->dispatcher->apply($event, $state)); - $this->dispatcher->fired($event, $states); - app(Queue::class)->queue($event); + $this->dispatcher->fired($event, $states); + if ($this->commit_immediately || $event instanceof CommitsImmediately) { $this->commit(); }