You are here

function hosting_queued_remove_semaphore_form_submit in Hosting 7.3

Same name and namespace in other branches
  1. 7.4 queued/hosting_queued.admin.inc \hosting_queued_remove_semaphore_form_submit()

submit function for the form for removing the hosting queue lock.

File

queued/hosting_queued.admin.inc, line 159
Configuration forms for the queue daemon.

Code

function hosting_queued_remove_semaphore_form_submit() {
  global $locks;
  unset($locks['hosting_queue_tasks_running']);
  $success = db_delete('semaphore')
    ->condition('name', 'hosting_queue_tasks_running')
    ->execute();
  if ($success) {
    drupal_set_message(t('Hosting Queue unlocked.'));
  }
  else {
    drupal_set_message(t('Hosting Queue was not unlocked. Something went wrong.'), 'error');
  }
}