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

Summary


Running tasks in a Drupal project becomes more and more important as the project matures and scales. Things like monitoring, cleaning up and upgrading our project need to be performed in a way that the task won't stress the system too much so that Drupal doesn't crash.

Drupal's cron is a very easy and convenient mechanism to run periodic tasks. We explained how to make Drupal not fire cron when serving regular web traffic and then we moved this responsibility to Drush plus a scheduling system: Jenkins. In the next section, we saw how to decouple a particular task from cron so that it runs as an independent process. Long tasks can use the Batch API in order to split the workload into smaller chunks that can complete safely.

We closed the chapter with a few tips on how to log a command's output into a file, such as the different output modes that Drush offers (verbose or quiet).

In the next chapter, we will dive even deeper into how Drush runs commands by adding error handing and discovering...