<commit_before><?php

class CM_Maintenance_Cli extends CM_Cli_Runnable_Abstract {

    /** CM_Clockwork_Manager */
    protected $_clockworkManager;

    /**
     * @synchronized
     */
    public function start() {
        $this->_clockworkManager = new CM_Clockwork_Manager();
        $this->_registerCallbacks();
        $this->_clockworkManager->start();
    }

    public function startLocal() {
        $this->_clockworkManager = new CM_Clockwork_Manager();
        $this->_registerCallbacksLocal();
        $this->_clockworkManager->start();
    }

    protected function _registerCallbacks() {
        $this->_registerClockworkCallbacks(new DateInterval('PT1M'), array(
            'CM_Model_User::offlineOld'                 => function () {
                    CM_Model_User::offlineOld();
                },
            'CM_ModelAsset_User_Roles::deleteOld'       => function () {
                    CM_ModelAsset_User_Roles::deleteOld();
                },
            'CM_Paging_Useragent_Abstract::deleteOlder' => function () {
                    CM_Paging_Useragent_Abstract::deleteOlder(100 * 86400);
                },
            'CM_File_UserContent_Temp::deleteOlder'     => function () {
                    CM_File_UserContent_Temp::deleteOlder(86400);
                },
            'CM_SVM_Model::deleteOldTrainings'          => function () {
                    CM_SVM_Model::deleteOldTrainings(3000);
                },
            'CM_Paging_Ip_Blocked::deleteOlder'         => function () {
                    CM_Paging_Ip_Blocked::deleteOlder(7 * 86400);
                },
            'CM_Captcha::deleteOlder'                   => function () {
                    CM_Captcha::deleteOlder(3600);
                },
            'CM_Session::deleteExpired'                 => function () {
                    CM_Session::deleteExpired();
                },
            'CM_Stream_Video::synchronize'              => function () {
                    CM_Stream_Video::getInstance()->synchronize();
                },
            'CM_Stream_Video::checkStreams'             => function () {
                    CM_Stream_Video::getInstance()->checkStreams();
                },
            'CM_Stream_Message::synchronize'            => function () {
                    CM_Stream_Message::getInstance()->synchronize();
                }
        ));
        $this->_registerClockworkCallbacks(new DateInterval('PT15M'), array(
            'CM_Mail::processQueue'               => function () {
                    CM_Mail::processQueue(500);
                },
            'CM_Action_Abstract::aggregate'       => function () {
                    CM_Action_Abstract::aggregate();
                },
            'CM_Paging_Log_Abstract::deleteOlder' => function () {
                    CM_Paging_Log_Abstract::cleanUpOld();
                }
        ));
    }

    protected function _registerCallbacksLocal() {
        $this->_registerClockworkCallbacks(new DateInterval('PT1M'), array(
            'CM_Cli_CommandManager::monitorSynchronizedCommands' => function () {
                    CM_Cli_CommandManager::monitorSynchronizedCommands();
                },
            'CM_SVM_Model::trainChanged'                         => function () {
                    CM_SVM_Model::trainChanged();
                },
        ));
    }

    public static function getPackageName() {
        return 'maintenance';
    }

    /**
     * @param DateInterval $interval
     * @param Closure[]    $callbacks
     */<commit_msg>Amended key name<commit_after><?php

class CM_Maintenance_Cli extends CM_Cli_Runnable_Abstract {

    /** CM_Clockwork_Manager */
    protected $_clockworkManager;

    /**
     * @synchronized
     */
    public function start() {
        $this->_clockworkManager = new CM_Clockwork_Manager();
        $this->_registerCallbacks();
        $this->_clockworkManager->start();
    }

    public function startLocal() {
        $this->_clockworkManager = new CM_Clockwork_Manager();
        $this->_registerCallbacksLocal();
        $this->_clockworkManager->start();
    }

    protected function _registerCallbacks() {
        $this->_registerClockworkCallbacks(new DateInterval('PT1M'), array(
            'CM_Model_User::offlineOld'                 => function () {
                    CM_Model_User::offlineOld();
                },
            'CM_ModelAsset_User_Roles::deleteOld'       => function () {
                    CM_ModelAsset_User_Roles::deleteOld();
                },
            'CM_Paging_Useragent_Abstract::deleteOlder' => function () {
                    CM_Paging_Useragent_Abstract::deleteOlder(100 * 86400);
                },
            'CM_File_UserContent_Temp::deleteOlder'     => function () {
                    CM_File_UserContent_Temp::deleteOlder(86400);
                },
            'CM_SVM_Model::deleteOldTrainings'          => function () {
                    CM_SVM_Model::deleteOldTrainings(3000);
                },
            'CM_Paging_Ip_Blocked::deleteOlder'         => function () {
                    CM_Paging_Ip_Blocked::deleteOlder(7 * 86400);
                },
            'CM_Captcha::deleteOlder'                   => function () {
                    CM_Captcha::deleteOlder(3600);
                },
            'CM_Session::deleteExpired'                 => function () {
                    CM_Session::deleteExpired();
                },
            'CM_Stream_Video::synchronize'              => function () {
                    CM_Stream_Video::getInstance()->synchronize();
                },
            'CM_Stream_Video::checkStreams'             => function () {
                    CM_Stream_Video::getInstance()->checkStreams();
                },
            'CM_Stream_Message::synchronize'            => function () {
                    CM_Stream_Message::getInstance()->synchronize();
                }
        ));
        $this->_registerClockworkCallbacks(new DateInterval('PT15M'), array(
            'CM_Mail::processQueue'               => function () {
                    CM_Mail::processQueue(500);
                },
            'CM_Action_Abstract::aggregate'       => function () {
                    CM_Action_Abstract::aggregate();
                },
            'CM_Paging_Log_Abstract::cleanUpOld' => function () {
                    CM_Paging_Log_Abstract::cleanUpOld();
                }
        ));
    }

    protected function _registerCallbacksLocal() {
        $this->_registerClockworkCallbacks(new DateInterval('PT1M'), array(
            'CM_Cli_CommandManager::monitorSynchronizedCommands' => function () {
                    CM_Cli_CommandManager::monitorSynchronizedCommands();
                },
            'CM_SVM_Model::trainChanged'                         => function () {
                    CM_SVM_Model::trainChanged();
                },
        ));
    }

    public static function getPackageName() {
        return 'maintenance';
    }

    /**
     * @param DateInterval $interval
     * @param Closure[]    $callbacks
     */
{'fraction_non_alphanumeric': 0.11402027027027027, 'fraction_numerical': 0.009572072072072071, 'mean_word_length': 1.6620457100037467, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 63, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2465147', 'n_tokens_mistral': 1912, 'n_tokens_neox': 1777, 'n_words': 206}