Skip to content
Snippets Groups Projects
Unverified Commit 9c1d3669 authored by DaveD's avatar DaveD Committed by GitHub
Browse files

Merge pull request #23775 from eileenmcnaughton/5.51

#3653 Fix on queue runner not working in upgrade
parents 1322b786 1cc49d30
No related branches found
No related tags found
No related merge requests found
......@@ -184,10 +184,16 @@ class CRM_Queue_Runner {
public function runAllViaWeb() {
$_SESSION['queueRunners'][$this->qrid] = serialize($this);
$url = CRM_Utils_System::url($this->pathPrefix . '/runner', 'reset=1&qrid=' . urlencode($this->qrid));
// If this was persistent/registered queue, ensure that no one else tries to execute it.
CRM_Core_DAO::executeQuery('UPDATE civicrm_queue SET status = NULL WHERE name = %1', [
1 => [$this->queue->getName(), 'String'],
]);
try {
// If this was persistent/registered queue, ensure that no one else tries to execute it.
CRM_Core_DAO::executeQuery('UPDATE civicrm_queue SET status = NULL WHERE name = %1', [
1 => [$this->queue->getName(), 'String'],
]);
}
catch (PEAR_Exception $e) {
// For sites being upgraded the field may not exist as yet.
// https://lab.civicrm.org/dev/core/-/issues/3653
}
CRM_Utils_System::redirect($url);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment