You are here

function background_process_service_unlock in Background Process 7.2

Same name and namespace in other branches
  1. 6 background_process.admin.inc \background_process_service_unlock()
  2. 7 background_process.admin.inc \background_process_service_unlock()

Unlock background process.

Parameters

$handle: Handle of process to unlock

1 string reference to 'background_process_service_unlock'
background_process_menu in ./background_process.module
Implements hook_menu().

File

./background_process.module, line 546

Code

function background_process_service_unlock($process) {
  global $user;
  if ($process
    ->log(t('Manually unlocked by @user', array(
    '@user' => $user->name,
  )))
    ->unlock()) {
    drupal_set_message(t('Process %handle unlocked', array(
      '%handle' => $process->handle,
    )));
  }
  else {
    drupal_set_message(t('Process %handle could not be unlocked', array(
      '%handle' => $process->handle,
    )), 'error');
  }
  drupal_goto();
}