CoreCommunity ExtensionsIncubatorDistributionsTYPO3 4.5 ProjectsTYPO3 4.7 ProjectsTYPO3 6.0 ProjectsTYPO3 6.1 ProjectsTYPO3 6.2 Projects (+)

Bug #30751

Check for lockingMode in class.tx_caretaker_testrunnertask.php

Added by Gernot Leitgab over 1 year ago.

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;
        }

Also available in: Atom PDF