You are here

function drush_gatsby_fastbuilds_delete in Gatsby Live Preview & Incremental Builds 8

Same name and namespace in other branches
  1. 2.0.x modules/gatsby_fastbuilds/gatsby_fastbuilds.drush.inc \drush_gatsby_fastbuilds_delete()

Deletes all the Gatsby Fastbuilds log entries.

File

modules/gatsby_fastbuilds/gatsby_fastbuilds.drush.inc, line 27
Contains gatsby_fastbuilds drush 8 commands.

Code

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);
}