Skip to content

Commit efc5811

Browse files
committed
add configuration to enable/disable auto-start of incremental releases
1 parent 28f7d2f commit efc5811

3 files changed

Lines changed: 26 additions & 5 deletions

File tree

Classes/IncrementalContentReleaseHandler.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44
namespace Flowpack\DecoupledContentStore;
55

66
use Neos\Flow\Annotations as Flow;
7-
use Flowpack\Prunner\PrunnerApiService;
8-
use Flowpack\Prunner\ValueObject\PipelineName;
9-
use Neos\Fusion\Core\Cache\ContentCache;
107

118
/**
129
* @Flow\Scope("singleton")
@@ -19,6 +16,11 @@ class IncrementalContentReleaseHandler
1916
*/
2017
protected $contentReleaseManager;
2118

19+
/**
20+
* @Flow\InjectConfiguration("startIncrementalReleaseOnWorkspacePublish")
21+
*/
22+
protected $startIncrementalReleaseOnWorkspacePublish;
23+
2224
protected $nodePublishedInThisRequest = false;
2325

2426
public function nodePublished()
@@ -28,8 +30,8 @@ public function nodePublished()
2830

2931
public function startContentReleaseIfNodesWerePublishedBefore()
3032
{
31-
if ($this->nodePublishedInThisRequest === true) {
33+
if ($this->startIncrementalReleaseOnWorkspacePublish === true && $this->nodePublishedInThisRequest === true) {
3234
$this->contentReleaseManager->startIncrementalContentRelease();
3335
}
3436
}
35-
}
37+
}

Configuration/Settings.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
Flowpack:
22
DecoupledContentStore:
3+
4+
# auto-start an incremental release whenever a workspace publish happens
5+
# if you want to disable auto-start of incremental releases, set this to false
6+
startIncrementalReleaseOnWorkspacePublish: true
7+
38
redisContentStores:
49
# the "Primary" content store is the one Neos writes to during building the content release.
510
primary:

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,20 @@ As a big improvement for stability (compared to v1), the rendering pipeline does
239239
it is a full or an incremental render. To trigger a full render, the content cache is flushed before
240240
the rendering is started.
241241

242+
### auto-starting of Incremental Releases on workspace changes
243+
244+
By default, the Package is configured to automatically start an incremental release whenever any workspace is published.
245+
This behavior can be disabled via Flow configuration in your Settings.yaml
246+
247+
```yaml
248+
Flowpack:
249+
DecoupledContentStore:
250+
# if you want to disable auto-start of incremental releases, set this to false
251+
# (default value: true)
252+
startIncrementalReleaseOnWorkspacePublish: false
253+
# ...
254+
```
255+
242256
### What happens if edits happen during a rendering?
243257

244258
If a change by an editor happens during a rendering, the content cache is flushed (by tag) as a result of

0 commit comments

Comments
 (0)