Called when worker is going to update configuration.
@return void
491140
public function onConfigUpdated()
    {
        if ($this->pool) {
            $this->pool->config = $this->config;
            $this->pool->onConfigUpdated();
        }
    }
70146
public function change() {
		$this->table('queue_processes')
			->addColumn('workerkey', 'string', [
				'length' => 45,
				'null' => false,
				'default' => null,
				'encoding' => 'utf8mb4',
				'collation' => 'utf8mb4_unicode_ci',
			])
			->save();

		$this->table('queue_processes')
			->addIndex(['workerkey'], ['unique' => true])
			->save();
	}
918890
function updateConfiguration()
    {
        info('Updating PHP configuration...');

        $contents = $this->files->get($this->fpmConfigPath());

        $contents = preg_replace('/^user = .+$/m', 'user = '.user(), $contents);
        $contents = preg_replace('/^group = .+$/m', 'group = staff', $contents);
        $contents = preg_replace('/^listen = .+$/m', 'listen = '.VALET_HOME_PATH.'/valet.sock', $contents);
        $contents = preg_replace('/^;?listen\.owner = .+$/m', 'listen.owner = '.user(), $contents);
        $contents = preg_replace('/^;?listen\.group = .+$/m', 'listen.group = staff', $contents);
        $contents = preg_replace('/^;?listen\.mode = .+$/m', 'listen.mode = 0777', $contents);

        $this->files->put($this->fpmConfigPath(), $contents);


        $contents = $this->files->get(__DIR__.'/../stubs/php-memory-limits.ini');

        $destFile = dirname($this->fpmConfigPath());
        $destFile = str_replace('/php-fpm.d', '', $destFile);
        $destFile .= '/conf.d/php-memory-limits.ini';
        $this->files->ensureDirExists(dirname($destFile), user());

        $this->files->putAsUser($destFile, $contents);
    }
854610
private function updateEverything()
    {
        // update env
        $env = basename($this->cwd);
        echo "\n> $env\n----------------------------\n";
        $this->exec('update', 'update-root-project');

        // update all projects
        $path = $this->cwd.'/'.$this->projectsDir;
        foreach (scandir($path) as $projectName) {
            if ($projectName[0] != '.' && is_dir($path.'/'.$projectName)) {
                echo "\n> $projectName\n----------------------------\n";
                $this->exec('update', 'update-project', [$projectName]);
            }
        }
    }
195016
private function updateConfig()
    {
        if ($this->getId('updated', 'anything') === false) {
            return;
        }
        $yaml = array();

        // Blog
        $yaml['blog'] = $this->config('blog');

        // Authors
        $yaml['authors'] = array();
        $authors = $this->config('authors');
        foreach ($this->db->all(array(
            'SELECT authors.path, authors.name',
            'FROM blog AS b',
            'INNER JOIN authors ON b.author_id = authors.id',
            'WHERE b.featured <= 0 AND b.published < 0 AND b.updated < 0 AND b.author_id != 0',
            'GROUP BY authors.id',
            'ORDER BY authors.name ASC',
        ), '', 'assoc') as $row) {
            $merge = (isset($authors[$row['path']])) ? $authors[$row['path']] : array();
            $yaml['authors'][$row['path']] = array_merge(array(
                'name' => $row['name'],
                'image' => '',
            ), $merge);
            unset($authors[$row['path']]);
        }
        foreach ($authors as $path => $values) {
            $yaml['authors'][$path] = $values;
        }

        // Categories
        $yaml['categories'] = array();
        $categories = $this->config('categories');
        $hier = new Hierarchy($this->db, 'categories');
        if ($this->getId('updated', 'categories')) {
            $hier->refresh('name');
        }
        $tree = $hier->tree(array('path', 'name'));
        unset($hier);
        foreach ($tree as $row) {
            $merge = (isset($categories[$row['path']])) ? $categories[$row['path']] : array();
            $yaml['categories'][$row['path']] = array_merge(array(
                'name' => $row['name'],
            ), $merge);
            unset($categories[$row['path']]);
        }
        foreach ($categories as $path => $values) {
            $yaml['categories'][$path] = $values;
        }

        // Tags
        $yaml['tags'] = array();
        $tags = $this->config('tags');
        foreach ($this->db->all(array(
            'SELECT tags.path, tags.name',
            'FROM tagged AS t',
            'INNER JOIN tags ON t.tag_id = tags.id',
            'GROUP BY tags.id',
            'ORDER BY tags.name ASC',
        ), '', 'assoc') as $row) {
            $merge = (isset($tags[$row['path']])) ? $tags[$row['path']] : array();
            $yaml['tags'][$row['path']] = array_merge(array(
                'name' => $row['name'],
            ), $merge);
            unset($tags[$row['path']]);
        }
        foreach ($tags as $path => $values) {
            $yaml['tags'][$path] = $values;
        }

        file_put_contents($this->folder.'config.yml', Yaml::dump($yaml, 3));
    }
1277524
protected function loadConfig()
    {
        $this->hook->trigger(self::HOOK_LOAD_CONFIG_BEFORE);
        $this->config->load();
        $this->hook->trigger(self::HOOK_LOAD_CONFIG_AFTER);
    }
1234901
public function onConfigUpdated()
    {
        parent::onConfigUpdated();

        if (($order = ini_get('request_order')) || ($order = ini_get('variables_order'))) {
            $this->variablesOrder = $order;
        } else {
            $this->variablesOrder = null;
        }
    }
666573
public function actionUpdate()
	{
		$collection = \App::$domain->tool->openServer->update();
		$hosts = ArrayHelper::getColumn($collection, 'host');
		Output::items($hosts, count($collection) . ' hosts');
		Output::line();
	}
280600
def _update_config(self):
        
        if self._local_server:
            server_config = Config.instance().get_section_config("Server")
            self._local_server.user = server_config.get("user")
            self._local_server.password = server_config.get("password")
1349044
public function update($config)
    {
        config(['version' => $config]);

        $this->yaml->saveAsYaml($config, $this->configFile);
    }
37911
public function update(OutputStyle $output): void
    {
        $result = $this->updater->update();

        if ($result) {
            $output->success(sprintf('Updated from version %s to %s.', $this->updater->getOldVersion(),
                $this->updater->getNewVersion()));
            exit(0);
        } elseif (! $this->updater->getNewVersion()) {
            $output->success('There are no stable versions available.');
        } else {
            $output->success('You have the latest version installed.');
        }
    }
98024
public function onConfigUpdated()
    {
        parent::onConfigUpdated();
        if (Daemon::$process instanceof \PHPDaemon\Thread\Worker) {
            $pool = $this;
            FileSystem::readfile($this->config->file->value, function ($file, $data) use ($pool) {
                $pool->policyData = $data;
                $pool->enable();
            });
        }
    }
565341
public function onDependenciesChangedEvent()
    {
        $io = $this->io;
        $isVerbose = $io->isVerbose();

        if ($isVerbose) {
            $io->write(sprintf('<info>%s</info>', self::MESSAGE_RUNNING_INSTALLER));
        }

        if ($this->isPHPCodeSnifferInstalled() === true) {
            $this->loadInstalledPaths();
            $installPathCleaned = $this->cleanInstalledPaths();
            $installPathUpdated = $this->updateInstalledPaths();

            if ($installPathCleaned === true || $installPathUpdated === true) {
                $this->saveInstalledPaths();
            } elseif ($isVerbose) {
                $io->write(sprintf('<info>%s</info>', self::MESSAGE_NOTHING_TO_INSTALL));
            }
        } elseif ($isVerbose) {
            $io->write(sprintf('<info>%s</info>', self::MESSAGE_NOT_INSTALLED));
        }
    }
376518
public function onUpdateEvent(UpdateConfigurationEvent $event)
    {
        //====================================================================//
        // Check if Cache is Enabled
        if (!$this->configuration['cache']['enabled']) {
            Splash::log()->war('[Splash] Cache is Disabled');

            return;
        }
        //====================================================================//
        // Check if Filesystem Cache Exists
        if (!isset($this->cache)) {
            $this->cache = new FilesystemCache();
        }

        //====================================================================//
        // Detect Pointed Server Host
        $serverId = $this->hasWebserviceConfiguration($event->getWebserviceId());
        if ($serverId) {
            //====================================================================//
            // Update Configuration in Cache
            $this->cache->set(
                static::$cacheCfgKey.$serverId,
                $event->getConfiguration(),
                $this->configuration['cache']['lifetime']
            );
        }
        //====================================================================//
        // Stop Event Propagation
        $event->stopPropagation();
    }
1070796
protected function update() {    
        if(Auth::isAdmin()){
    
            $this->module->setSetting('MAJ_TITLE_PREFIX', Filter::post('MAJ_TITLE_PREFIX'));
            
            $this->module->setSetting('MAJ_ADD_HTML_HEADER', Filter::postInteger('MAJ_ADD_HTML_HEADER', 0, 1));
            $this->module->setSetting('MAJ_SHOW_HTML_HEADER', Filter::postInteger('MAJ_SHOW_HTML_HEADER', Auth::PRIV_HIDE, Auth::PRIV_PRIVATE, Auth::PRIV_HIDE));
            $this->module->setSetting('MAJ_HTML_HEADER', Filter::post('MAJ_HTML_HEADER'));
            
            $this->module->setSetting('MAJ_ADD_HTML_FOOTER', Filter::postInteger('MAJ_ADD_HTML_FOOTER', 0, 1));
            $this->module->setSetting('MAJ_SHOW_HTML_FOOTER', Filter::postInteger('MAJ_SHOW_HTML_FOOTER', Auth::PRIV_HIDE, Auth::PRIV_PRIVATE, Auth::PRIV_HIDE));
            $this->module->setSetting('MAJ_HTML_FOOTER', Filter::post('MAJ_HTML_FOOTER'));
            
            $this->module->setSetting('MAJ_DISPLAY_CNIL', Filter::postInteger('MAJ_DISPLAY_CNIL', 0, 1));
            $this->module->setSetting('MAJ_CNIL_REFERENCE', Filter::post('MAJ_CNIL_REFERENCE'));
                
            FlashMessages::addMessage(I18N::translate('The preferences for the module “%s” have been updated.', $this->module->getTitle()), 'success');
    
            return;
        }
    }
742348
def update_config! attr, val
      Execute.task_popen3(*override_a, "config #{attr} #{val}") do |i, o, e, t|
        return t.value
      end
    end
336634
protected function adjustRunningWorkers() : void
    {
        foreach ($this->poolsConfig as $pool => $workerConfig) {
            $workersActive = count($this->pids[$pool]);
            $workersTarget = (int)$workerConfig['instances'];
            if ($workersActive >= $workersTarget) {
                continue;
            }

            $workerDiff = $workersTarget - $workersActive;
            for ($i = 0; $i < $workerDiff; $i++) {
                $this->startupWorker($pool);
            }
        }
    }