function drush_notify_allowed

8.0.x notify.drush.inc drush_notify_allowed($command)
6.x notify.drush.inc drush_notify_allowed($command)
7.x notify.drush.inc drush_notify_allowed($command)
master notify.drush.inc drush_notify_allowed($command)

Identify if the given Drush request should trigger a notification.

Parameters

$command: Name of the command.

Return value

Boolean

3 calls to drush_notify_allowed()
drush_notify_shutdown_error in commands/core/notify.drush.inc
Shutdown function to signal on errors.
drush_pm_download in commands/pm/download.pm.inc
Command callback. Download Drupal core or any project.
notify_drush_exit in commands/core/notify.drush.inc
Implements hook_drush_exit().

File

commands/core/notify.drush.inc, line 198
Add system notifications as a new drush option.

Code

function drush_notify_allowed($command) {
  $notify = drush_get_option(array('notify', 'notify-audio'), FALSE);
  $execution = time() - $_SERVER['REQUEST_TIME'];

  return ($notify === TRUE || (is_numeric($notify) && $notify > 0 && $execution > $notify));
}