Skip to content

Commit 4ad2f52

Browse files
committed
MAGECLOUD-2862: Post_deploy Phase Cannot Start on PaaS due to Crons Running
1 parent 92807ae commit 4ad2f52

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

src/App/Container.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,6 @@ function () {
256256
$this->container->make(DeployProcess\DeployStaticContent::class),
257257
$this->container->make(DeployProcess\CompressStaticContent::class),
258258
$this->container->make(DeployProcess\DisableGoogleAnalytics::class),
259-
$this->container->make(DeployProcess\EnableCron::class),
260259

261260
/**
262261
* This process runs processes if only post_deploy hook is not configured.
@@ -270,6 +269,7 @@ function () {
270269
->give(function () {
271270
return $this->container->makeWith(ProcessComposite::class, [
272271
'processes' => [
272+
$this->container->make(PostDeployProcess\EnableCron::class),
273273
$this->container->make(PostDeployProcess\Backup::class),
274274
$this->container->make(PostDeployProcess\CleanCache::class),
275275
],
@@ -376,6 +376,7 @@ function () {
376376
],
377377
],
378378
]),
379+
$this->container->make(PostDeployProcess\EnableCron::class),
379380
$this->container->make(PostDeployProcess\Backup::class),
380381
$this->container->make(PostDeployProcess\CleanCache::class),
381382
$this->container->make(PostDeployProcess\WarmUp::class),

src/Process/Deploy/DeployCompletion.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public function execute()
5151
{
5252
if ($this->hookChecker->isPostDeployHookEnabled()) {
5353
$this->logger->info(
54-
'Post-deploy hook enabled. Cache cleaning and pre-warming operations ' .
54+
'Post-deploy hook enabled. Cron enabling, cache cleaning and pre-warming operations ' .
5555
'are postponed to post-deploy stage.'
5656
);
5757

src/Process/Deploy/EnableCron.php renamed to src/Process/PostDeploy/EnableCron.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6-
namespace Magento\MagentoCloud\Process\Deploy;
6+
namespace Magento\MagentoCloud\Process\PostDeploy;
77

88
use Magento\MagentoCloud\Config\Deploy\Reader;
99
use Magento\MagentoCloud\Config\Deploy\Writer;

src/Test/Unit/Process/Deploy/EnableCronTest.php renamed to src/Test/Unit/Process/PostDeploy/EnableCronTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6-
namespace Magento\MagentoCloud\Test\Unit\Process\Deploy;
6+
namespace Magento\MagentoCloud\Test\Unit\Process\PostDeploy;
77

88
use Magento\MagentoCloud\Config\Deploy\Reader;
99
use Magento\MagentoCloud\Config\Deploy\Writer;
10-
use Magento\MagentoCloud\Process\Deploy\EnableCron;
10+
use Magento\MagentoCloud\Process\PostDeploy\EnableCron;
1111
use Psr\Log\LoggerInterface;
1212
use PHPUnit\Framework\TestCase;
1313
use PHPUnit\Framework\MockObject\MockObject;

0 commit comments

Comments
 (0)