Skip to content

Commit e8c469b

Browse files
MAGECLOUD-5181: Disable cron container by default (#144)
1 parent 8d6a8bd commit e8c469b

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

src/Command/BuildCompose.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class BuildCompose extends Command
5050
private const OPTION_NODE = 'node';
5151
private const OPTION_MODE = 'mode';
5252
private const OPTION_SYNC_ENGINE = 'sync-engine';
53-
private const OPTION_NO_CRON = 'no-cron';
53+
private const OPTION_WITH_CRON = 'with-cron';
5454
private const OPTION_WITH_SELENIUM = 'with-selenium';
5555

5656
/**
@@ -209,10 +209,10 @@ protected function configure(): void
209209
DeveloperBuilder::SYNC_ENGINE_DOCKER_SYNC
210210
)
211211
->addOption(
212-
self::OPTION_NO_CRON,
212+
self::OPTION_WITH_CRON,
213213
null,
214214
InputOption::VALUE_NONE,
215-
'Remove cron container'
215+
'Add cron container'
216216
)
217217
->addOption(
218218
self::OPTION_WITH_SELENIUM,
@@ -254,7 +254,7 @@ public function execute(InputInterface $input, OutputInterface $output)
254254

255255
$config->set([
256256
DeveloperBuilder::KEY_SYNC_ENGINE => $syncEngine,
257-
ProductionBuilder::KEY_NO_CRON => $input->getOption(self::OPTION_NO_CRON),
257+
ProductionBuilder::KEY_WITH_CRON=> $input->getOption(self::OPTION_WITH_CRON),
258258
ProductionBuilder::KEY_WITH_SELENIUM => $input->getOption(self::OPTION_WITH_SELENIUM)
259259
]);
260260

src/Compose/FunctionalBuilder.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ public function build(): array
8686
*/
8787
public function setConfig(Repository $config): void
8888
{
89-
$config->set(self::KEY_NO_CRON, true);
9089
$config->set(self::KEY_WITH_SELENIUM, false);
9190
$config->set(self::KEY_NO_TMP_MOUNTS, true);
9291

src/Compose/ProductionBuilder.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class ProductionBuilder implements BuilderInterface
3333
public const SERVICE_PHP_CLI = ServiceFactory::SERVICE_CLI;
3434
public const SERVICE_PHP_FPM = ServiceFactory::SERVICE_FPM;
3535

36-
public const KEY_NO_CRON = 'no-cron';
36+
public const KEY_WITH_CRON = 'with-cron';
3737
public const KEY_EXPOSE_DB_PORT = 'expose-db-port';
3838
public const KEY_NO_TMP_MOUNTS = 'no-tmp-mounts';
3939
public const KEY_WITH_SELENIUM = 'with-selenium';
@@ -296,7 +296,7 @@ public function build(): array
296296
]
297297
);
298298

299-
if (!$this->config->get(self::KEY_NO_CRON, false)) {
299+
if ($this->config->get(self::KEY_WITH_CRON, false)) {
300300
$services['cron'] = $this->getCronCliService(
301301
$phpVersion,
302302
true,

0 commit comments

Comments
 (0)