protected function postEventsActions(array $executed_events_ids, $queue_name)
 {
     $this->site_cache->restoreOwnership();
     // Since generating aliases may be costly, do it only once everything else is processed
     if ($this->backend_aliases->aliasesNeedUpdate()) {
         $this->backend_aliases->update();
     }
     // Update CVS root allow file once everything else is processed
     if ($this->backend_cvs->getCVSRootListNeedUpdate()) {
         $this->backend_cvs->CVSRootListUpdate();
     }
     // Update SVN root definition for Apache once everything else is processed
     if ($this->backend_svn->getSVNApacheConfNeedUpdate()) {
         $this->backend_svn->generateSVNApacheConf();
         // Need to refresh apache (graceful)
         system('/sbin/service httpd graceful');
     }
     // Update system user and group caches once everything else is processed
     if ($this->backend_system->getNeedRefreshUserCache()) {
         $this->backend_system->refreshUserCache();
     }
     if ($this->backend_system->getNeedRefreshGroupCache()) {
         $this->backend_system->refreshGroupCache();
     }
     $this->triggerApplicationOwnerEventsProcessing();
 }
Exemplo n.º 2
0
 static function clear()
 {
     SessionCache::clear();
     SiteCache::clear();
     PageCache::clear();
     return;
 }
Exemplo n.º 3
0
 public function itCreatesCacheDirectories()
 {
     $cache_dir = sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'tuleap_cache_dir';
     $combined_dir = sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'tuleap_combined_dir';
     $lang_dir = sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'tuleap_lang_dir';
     ForgeConfig::set('codendi_cache_dir', $cache_dir);
     ForgeConfig::set('sys_combined_dir', $combined_dir);
     $logger = mock('Logger');
     $language = stub('BaseLanguage')->getCacheDirectory()->returns($lang_dir);
     $GLOBALS['Language'] = $language;
     $site_cache = new SiteCache($logger);
     $site_cache->restoreCacheDirectories();
     $this->assertTrue(is_dir($cache_dir));
     $this->assertTrue(is_dir($combined_dir));
     $this->assertTrue(is_dir($lang_dir));
     rmdir($cache_dir);
     rmdir($combined_dir);
     rmdir($lang_dir);
 }
Exemplo n.º 4
0
 public function installAndActivate($name)
 {
     $plugin = $this->plugin_factory->getPluginByName($name);
     if (!$plugin) {
         $plugin = $this->installPlugin($name);
     }
     if (!$this->plugin_factory->isPluginAvailable($plugin)) {
         $this->plugin_factory->availablePlugin($plugin);
     }
     $this->site_cache->invalidatePluginBasedCaches();
 }
Exemplo n.º 5
0
print <<<EOS
<ul>
<li>Affiliation: {$row['affiliation']}
<li>CC: {$row['cc']}
<li>Contact: {$row['contact']}
<li>Deputies: {$row['deputies']}
<li>Host Site: {$row['hostsite']}
<li>CMF: {$row['cmf']}
<li>OCCI: {$row['ep_occi']}
<li>CDMI: {$row['ep_cdmi']}
<li>Size: {$row['res_size']}
<li>Max VM: {$row['vm_max_size']}
</ul>
EOS;
// cache operation
$sitec = new SiteCache();
//$sitec->set_debug(true, "<br>");
$vtime = 3600;
// 1 hour
$sitec->set_valid_time($vtime);
print <<<EOS
<form name='form2' action='{$env['self']}'>
EOS;
$occi_url = $row['ep_occi'];
$occi->Set_OCCI_Address($occi_url);
//dd($occi);
// check cache first
$output = $sitec->List_OS_Template($siteid);
if ($output) {
    $from_cache = true;
} else {
Exemplo n.º 6
0
            $command = 'version';
            break;
        case 'c':
        case 'clear-caches':
            $command = 'clear-caches';
            break;
    }
}
if (!$command) {
    show_usage();
    exit(0);
}
require_once 'pre.php';
switch ($command) {
    case 'clear-caches':
        $site_cache = new SiteCache(new Log_ConsoleLogger());
        $site_cache->invalidatePluginBasedCaches();
        break;
    case 'version':
        show_version();
        break;
    default:
        show_usage();
}
function show_usage()
{
    echo <<<EOT
Usage: tuleap COMMAND

Tuleap administration command line
Exemplo n.º 7
0
            $command = 'restore-caches';
            break;
    }
}
if (!$command) {
    show_usage();
    exit(0);
}
require_once 'pre.php';
switch ($command) {
    case 'clear-caches':
        $site_cache = new SiteCache(new Log_ConsoleLogger());
        $site_cache->invalidatePluginBasedCaches();
        break;
    case 'restore-caches':
        $site_cache = new SiteCache(new Log_ConsoleLogger());
        $site_cache->restoreCacheDirectories();
        $site_cache->restoreOwnership();
        break;
    case 'version':
        show_version();
        break;
    default:
        show_usage();
}
function show_usage()
{
    echo <<<EOT
Usage: tuleap COMMAND

Tuleap administration command line