Bug #30751
Check for lockingMode in class.tx_caretaker_testrunnertask.php
| Status: | New | Start date: | 2011-10-10 | |
|---|---|---|---|---|
| Priority: | Should have | Due date: | ||
| Assignee: | - | % Done: | 0% |
|
| Category: | - | |||
| Target version: | - | |||
| Votes: | 0 |
Description
If 'lockingMode' is set to 'disable', updates will fail always. Therefore use locks if lockingMode is not disabled.
Use:
if ($GLOBALS['TYPO3_CONF_VARS']['SYS']['lockingMode'] != 'disable'){
$lockObj = t3lib_div::makeInstance('t3lib_lock', 'tx_caretaker_update_'.$node->getCaretakerNodeId() , $GLOBALS['TYPO3_CONF_VARS']['SYS']['lockingMode'] );
if( $lockObj->acquire() ) {
$node->updateTestResult();
$lockObj->release();
} else {
return false;
}
} else {
$node->updateTestResult();
}
Instead of:
$lockObj = t3lib_div::makeInstance('t3lib_lock', 'tx_caretaker_update_'.$node->getCaretakerNodeId() , $GLOBALS['TYPO3_CONF_VARS']['SYS']['lockingMode'] );
if( $lockObj->acquire() ) {
$node->updateTestResult();
$lockObj->release();
} else {
return false;
}