public function checkRunningAsCorrectUser()
    {
        if (Mage::helper('aoe_scheduler')->runningAsConfiguredUser()) {
            return true;
        }

        // We may decide that these processes should be killed, or they may continue...
        $kill = Mage::helper('aoe_scheduler')->getShouldKillOnWrongUser();
        $optionalKillMessage = ($kill) ? ' Schedule will not run until this is addressed.' : '';

        $this->log(
            sprintf(
                'Job "%s" (id: %s) is running as %s, but this doesn\'t match the configuration. You can disable this'
                . ' message by setting the default user in configuration.' . $optionalKillMessage,
                $this->getJobCode(),
                $this->getId(),
                Mage::helper('aoe_scheduler')->getRunningUser()
            )
        );

        if ($kill) {
            return false;
        }

        // Allow it to run anyway
        return true;
    }
public function checkRunningAsCorrectUser()
    {
        if (Mage::helper('aoe_scheduler')->runningAsConfiguredUser()) {
            return true;
        }

        // We may decide that these processes should be killed, or they may continue...
        $kill = Mage::helper('aoe_scheduler')->getShouldKillOnWrongUser();
        $optionalKillMessage = ($kill) ? ' Schedule will not run until this is addressed.' : '';

        $this->log(
            sprintf(
                'Job "%s" (id: %s) is running as %s, but this doesn\'t match the configuration. You can disable this'
                . ' message by setting the default user in configuration.' . $optionalKillMessage,
                $this->getJobCode(),
                $this->getId(),
                Mage::helper('aoe_scheduler')->getRunningUser()
            )
        );

        if ($kill) {
            return false;
        }

        // Allow it to run anyway
        return true;
    }
public function checkRunningAsCorrectUser ( ) { if ( Mage :: helper ( 'aoe_scheduler' ) -> runningAsConfiguredUser ( ) ) { return true ; } // We may decide that these processes should be killed, or they may continue... $ kill = Mage :: helper ( 'aoe_scheduler' ) -> getShouldKillOnWrongUser ( ) ; $ optionalKillMessage = ( $ kill ) ? ' Schedule will not run until this is addressed.' : '' ; $ this -> log ( sprintf ( 'Job "%s" (id: %s) is running as %s, but this doesn\'t match the configuration. You can disable this' . ' message by setting the default user in configuration.' . $ optionalKillMessage , $ this -> getJobCode ( ) , $ this -> getId ( ) , Mage :: helper ( 'aoe_scheduler' ) -> getRunningUser ( ) ) ) ; if ( $ kill ) { return false ; } // Allow it to run anyway return true ; }
Check if the user running the process matches the configured user. Message will capture
cases where the user is not set too in its response message. Process may optionally be
killed, or may be allowed to continue.
@return bool
Check if the user running the process matches the configured user . Message will capture cases where the user is not set too in its response message . Process may optionally be killed or may be allowed to continue .