Fix for in-app lock contention - move task initialization into PageLayoutInitPlugin to run after session is loaded
Conflicts: airtime_mvc/application/Bootstrap.php
This commit is contained in:
parent
6cbc2f5316
commit
a6eb4dc3e8
|
@ -82,20 +82,6 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
|
||||||
$view->doctype('XHTML1_STRICT');
|
$view->doctype('XHTML1_STRICT');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
protected function _initTasks() {
|
|
||||||
/* We need to wrap this here so that we aren't checking when we're running the unit test suite
|
|
||||||
*/
|
|
||||||
if (getenv("AIRTIME_UNIT_TEST") != 1) {
|
|
||||||
$taskManager = TaskManager::getInstance();
|
|
||||||
$taskManager->runTask(AirtimeTask::UPGRADE); // Run the upgrade on each request (if it needs to be run)
|
|
||||||
//This will do the upgrade too if it's needed...
|
|
||||||
$taskManager->runTasks();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
protected function _initZFDebug()
|
protected function _initZFDebug()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
|
@ -48,6 +48,7 @@ class PageLayoutInitPlugin extends Zend_Controller_Plugin_Abstract
|
||||||
|
|
||||||
$this->_initGlobals();
|
$this->_initGlobals();
|
||||||
$this->_initCsrfNamespace();
|
$this->_initCsrfNamespace();
|
||||||
|
$this->_initTasks();
|
||||||
$this->_initHeadLink();
|
$this->_initHeadLink();
|
||||||
$this->_initHeadScript();
|
$this->_initHeadScript();
|
||||||
$this->_initTitle();
|
$this->_initTitle();
|
||||||
|
@ -56,6 +57,20 @@ class PageLayoutInitPlugin extends Zend_Controller_Plugin_Abstract
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If we're not running unit tests, run the TaskManager tasks on each request
|
||||||
|
*/
|
||||||
|
protected function _initTasks() {
|
||||||
|
/* We need to wrap this here so that we aren't checking when we're running the unit test suite
|
||||||
|
*/
|
||||||
|
if (getenv("AIRTIME_UNIT_TEST") != 1) {
|
||||||
|
$taskManager = TaskManager::getInstance();
|
||||||
|
$taskManager->runTask(TaskFactory::UPGRADE); // Run the upgrade on each request (if it needs to be run)
|
||||||
|
//This will do the upgrade too if it's needed...
|
||||||
|
$taskManager->runTasks();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
protected function _initGlobals()
|
protected function _initGlobals()
|
||||||
{
|
{
|
||||||
if (!Zend_Session::isStarted()) {
|
if (!Zend_Session::isStarted()) {
|
||||||
|
|
Loading…
Reference in New Issue