Skip to content

Commit d59264f

Browse files
authored
feat: add ability to disable configure task
1 parent 8d32123 commit d59264f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/Tasks/AlgoliaConfigure.php

+7
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,17 @@ class AlgoliaConfigure extends BuildTask
2020

2121
private static $segment = 'AlgoliaConfigure';
2222

23+
private static $enabled = true;
24+
2325
public function run($request)
2426
{
2527
$service = Injector::inst()->get(AlgoliaService::class);
2628

29+
if (!$this->config()->get('enabled')) {
30+
echo 'Algolia configuration task is disabled.' . PHP_EOL;
31+
return;
32+
}
33+
2734
try {
2835
if ($service->syncSettings()) {
2936
echo 'Success.' . PHP_EOL;

0 commit comments

Comments
 (0)