Called when worker is going to update configuration.
@return void
771554
public function onConfigUpdated()
    {
        if ($this->xmppclient) {
            $this->xmppclient->config = $this->config;
            $this->xmppclient->onConfigUpdated();
        }
    }
354833
public function updateModule()
	{
		$this->moduleHandle->cacheModuleConfig();	//oke
		$this->moduleHandle->setModules();	//oke
		$this->moduleHandle->updateModuleAddon();
	}
819062
def update(self):
        
        with open(os.path.join(self.config_dir, CONFIG_FILE_NAME), 'w') as config_file:
            self.config.write(config_file)
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();
    }
706754
public function update()
    {
        try {
            Option::set(self::LAST_RUN_TIME_OPTION_NAME, Date::factory('today')->getTimestamp());

            $locUrl = Option::get(self::LOC_URL_OPTION_NAME);
            if (!empty($locUrl)) {
                $this->downloadFile('loc', $locUrl);
            }

            $ispUrl = Option::get(self::ISP_URL_OPTION_NAME);
            if (!empty($ispUrl)) {
                $this->downloadFile('isp', $ispUrl);
            }
        } catch (Exception $ex) {
            // message will already be prefixed w/ 'GeoIP2AutoUpdater: '
            Log::error($ex);
            $this->performRedundantDbChecks();
            throw $ex;
        }

        $this->performRedundantDbChecks();
    }
689185
public function onAfterWrite() {
        $store = $this->targetStore();
        if (strlen($store)) {
            Config::inst()->update('File', 'update_filesystem', false);

            // however, lets also ensure the changed filename file update check is run
            // which is otherwise triggered by updateFilesystem
            $changedFields = $this->owner->getChangedFields();

            // $this->owner->IgnorePathChanges gets set by the rename path job
            if (isset($changedFields['Filename']) && !$this->owner->IgnorePathChanges && $this->owner instanceof File) {
                $pathBefore = $changedFields['Filename']['before'];
                $pathAfter = $changedFields['Filename']['after'];

                if($pathBefore && $pathBefore != $pathAfter) {
                    // update links call
                    $this->owner->extend('updateLinks', $pathBefore, $pathAfter);

                    $children = File::get()->filter('ParentID', $this->owner->ID);
                    if ($children->count() > 0) {
                        if (class_exists('QueuedJobService')) {
                            singleton('QueuedJobService')->queueJob(new RenameFolderPathJob($this->owner, $children));
                        } else {
                            $this->updateChildFolderLinks($children, $pathBefore, $pathAfter);
                        }
                    }
                }
            }
        }
        parent::onAfterWrite();
    }
493795
protected function onReconfigure()
    {
        parent::onReconfigure();
        $this->client->resetApplication();
        $this->configureClient($this->config);
        $this->client->startApp();
    }
778871
protected function setConfig()
    {
        if ($this->data['config']) {
            $this->config = array_replace($this->config, $this->data['config']);
        }
    }
758485
public function onUpdate() {
    
    if (file_exists($this->savedTimestampPath)) {
      $readTimestamp = file_get_contents($this->savedTimestampPath);
      if ($readTimestamp != $this->savedTimestamp) {
        foreach ($this->clients as $sendto) {
          $sendto->send($readTimestamp);
        }
        $this->savedTimestamp = $readTimestamp;
      }
    }
    
  }
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();
            });
        }
    }
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);
    }
512040
public function update()
	{
		// Get group config
		$groupsConfig = \Component::params('com_groups');

		// Path to group folder
		$directory  = PATH_APP . DS . trim($groupsConfig->get('uploadpath', '/site/groups'), DS);
		$directory .= DS . $this->group->get('gidNumber');

		// Get task, defaults to update
		$task = ($this->arguments->getOpt(3)) ? $this->arguments->getOpt(3) : 'update';

		// Set our group directory & call update
		$this->arguments->setOpt('r', $directory);
		\App::get('client')->call('repository', $task, $this->arguments, $this->output);
	}
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.');
        }
    }
895748
protected function configHandle()
    {
        $packageConfigPath = __DIR__.'/config/config.php';
        $appConfigPath     = config_path('comment.php');

        $this->mergeConfigFrom($packageConfigPath, 'comment');

        $this->publishes([
            $packageConfigPath => $appConfigPath,
        ], 'config');
    }
475052
public function change() {
		$table = $this->table('queued_tasks');
		$table->addColumn('jobtype', 'string', ['length' => 45])
			->addColumn('data', 'text', ['null' => true])
			->addColumn('group', 'string', ['length' => 255, 'null' => true, 'default' => null])
			->addColumn('reference', 'string', ['length' => 255, 'null' => true, 'default' => null])
			->addColumn('created', 'datetime', ['null' => true, 'default' => null])
			->addColumn('notbefore', 'datetime', ['null' => true, 'default' => null])
			->addColumn('fetched', 'datetime', ['null' => true, 'default' => null])
			->addColumn('completed', 'datetime', ['null' => true, 'default' => null])
			->addColumn('progress', 'float', ['null' => true])
			->addColumn('failed', 'integer', ['default' => 0])
			->addColumn('failure_message', 'text', ['null' => true])
			->addColumn('workerkey', 'string', ['length' => 45, 'null' => true, 'default' => null])
			->create();
	}
392160
public function actionIndex()
    {
        if ($this->confirm('Do you want to update RBAC configuration?')) {
            $this->stdout('Performing RBAC update...' . "\n");
            $installer = new Installer();
            $installer->update($this->module->configData());
            $this->stdout('RBAC configuration up to date!' . "\n", Console::FG_GREEN);
        }
    }
264847
public function run(): void
    {
        if (!$this->config->isLoadedFromFile()) {
            throw new \RuntimeException('No configuration to edit');
        }

        $this->checkHook();
        $this->checkChange();

        $change = $this->createChange();
        $change->applyTo($this->config);
        Config\Util::writeToDisk($this->config);

        $this->io->write('Configuration successfully updated');
    }