You are here

public function DefaultController::backgroundProcessServiceUnlock in Background Process 8

Implements Background Process Service Unlock.

1 string reference to 'DefaultController::backgroundProcessServiceUnlock'
background_process.routing.yml in ./background_process.routing.yml
background_process.routing.yml

File

src/Controller/DefaultController.php, line 88

Class

DefaultController
Implements Default controller for the background_process module.

Namespace

Drupal\background_process\Controller

Code

public function backgroundProcessServiceUnlock($handle) {
  $handle = rawurldecode($handle);
  if (background_process_unlock($handle)) {
    drupal_set_message($this
      ->t('Process %handle unlocked', [
      '%handle' => $handle,
    ]));
  }
  else {
    drupal_set_message($this
      ->t('Process %handle could not be unlocked', [
      '%handle' => $handle,
    ]), 'error');
  }
  return new RedirectResponse('/admin/config/system/background-process/overview');
}