Skip to content

Commit 2211cfa

Browse files
committed
add docs
1 parent bbc0a18 commit 2211cfa

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

docs/pages/subscription.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1315,6 +1315,18 @@ foreach ($subscriptions as $subscription) {
13151315
echo $subscription->status()->value;
13161316
}
13171317
```
1318+
### Refresh
1319+
1320+
If you change the metadata of a subscriber in the code (e.g. `runMode`, `group` or `cleanupTasks`),
1321+
you can use the `refresh` method to update the existing subscriptions in the store.
1322+
1323+
```php
1324+
use Patchlevel\EventSourcing\Subscription\Engine\SubscriptionEngine;
1325+
use Patchlevel\EventSourcing\Subscription\Engine\SubscriptionEngineCriteria;
1326+
1327+
/** @var SubscriptionEngine $subscriptionEngine */
1328+
$subscriptionEngine->refresh(new SubscriptionEngineCriteria());
1329+
```
13181330
## Learn more
13191331

13201332
* [How to use CLI commands](./cli.md)

0 commit comments

Comments
 (0)