gatsby_fastbuilds.drush.inc in Gatsby Live Preview & Incremental Builds 8
Same filename and directory in other branches
Contains gatsby_fastbuilds drush 8 commands.
File
modules/gatsby_fastbuilds/gatsby_fastbuilds.drush.incView source
<?php
/**
* @file
* Contains gatsby_fastbuilds drush 8 commands.
*/
/**
* Implements hook_drush_command().
*/
function gatsby_fastbuilds_drush_command() {
$commands['gatsby-fastbuilds-delete'] = [
'description' => 'Deletes all the Gatsby Fastbuilds Log entries.',
'aliases' => [
'gatsdel',
],
'examples' => [
'drush gatsdel' => 'Deletes all the Gatsby Fastbuilds Log entries.',
],
];
return $commands;
}
/**
* Deletes all the Gatsby Fastbuilds log entries.
*/
function drush_gatsby_fastbuilds_delete() {
$time = time();
\Drupal::service('gatsby.gatsby_logger')
->deleteExpiredLoggedEntities($time);
// Store the log time in order to validate future syncs.
\Drupal::state()
->set('gatsby_fastbuilds.last_logtime', $time);
}
Functions
Name | Description |
---|---|
drush_gatsby_fastbuilds_delete | Deletes all the Gatsby Fastbuilds log entries. |
gatsby_fastbuilds_drush_command | Implements hook_drush_command(). |