deployer
deployer copied to clipboard
M2 recipe : handle cron stop in try catch
trafficstars
This change handle the case when cron:remove can not be executed properly, for example when setup:upgrade or Magento 2 installation wasn't done properly.
Try/Catch prevents breaking of deployment (as cron stopping is nice to have, but not required).
I'm not entirely sure this should be in the default recipe at all. Installing the cron is a one-off task and shouldn't occur on every deployment.
- I believe stopping cron jobs while deploying is a good practice
- The path to bin/magento in the crontab will contain the release number while executing cron:install manually, so this path should be updated by the deployment process
So I believe this MR should be accepted