Book Image

Drush for Developers - Second Edition

By : Juan Pablo Novillo Requena, Juan P Novillo Requena
Book Image

Drush for Developers - Second Edition

By: Juan Pablo Novillo Requena, Juan P Novillo Requena

Overview of this book

Table of Contents (13 chapters)
Drush for Developers Second Edition
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
2
Keeping Database Configuration and Code Together
Index

Running a command in the background


Imagine the following scenario: a new release is ready to go into the production environment. It contains changes for how articles are indexed into Apache Solr. The team has decided that once the new release has been deployed into production, you will log in to it via SSH and run a couple of Drush commands to mark the Article content type to be reindexed and to run the Drush command to reindex content so that all articles are submitted again to Apache Solr. This process, on large databases with a lot of content, might take a few hours to complete. If the SSH connection breaks or if we close it, the process would be killed automatically. Therefore, we should instruct it to run in the background.

Here is an example where we access the production environment and run the command in the noninteractive mode; so, even though we close the SSH connection, it would still run and save the output into a log that we can read once it finishes: