How to do reset columns from collection Query by magento 2?

You can reset columns from the given collection in Magento.

Many times you want to be sure of the better performance for a given query and you want to reset a specific collection by fetching a few of the columns in the result.

Magento Collection provides the reset() method to clear specific part from the sql query. Continue reading “How to do reset columns from collection Query by magento 2?”

How to override cron job group in Magento 2?

You can see your existing cron Group name from your module crontab.xml file.

Override the Module Cron Job group from default to custom group easily. Also, you can change the cron schedule time.

If you want to override any existing Crom Job that contains a default Group, You can change it to your custom group by creating a simple module. Continue reading “How to override cron job group in Magento 2?”

Circle Ci pipeline deployment Failed with error Execute “deploy:unlock” task to unlock.

While you are deploying your code with the Circle ci pipeline and if your deployment is stuck without deployment success and if the error will be thrown like this,

Deploy locked by ci.
Execute “deploy:unlock” task to unlock

You can fix this issue by manually deleting deploy.lock from your server.

In my case, It was a Sonassi server and You have to go SSH with your project root,

project_root_domain/___deploy/.dep/deploy.lock

Just Delete the deploy.lock file from here and start deployment again to fix the issue.

Whenever a deployment starts it creates a lock file to naturally stop against multiple deploys being done since a deployment can touch the database. You need to manually remove this file to run the deployment again.

When Deployment started, https://github.com/deployphp/deployer/blob/master/recipe/common.php#L137 It can already lock the current deployment before the release is completed.