Reload configuration
777235
def reload(self):
        

        self.read_config()
        for section in self._override_config:
            self.set_section_config(section, self._override_config[section])
122670
def reload_(name):
    '''
    
    '''
    if _service_is_upstart(name):
        cmd = 'reload {0}'.format(name)
    else:
        cmd = '/sbin/service {0} reload'.format(name)
    return not __salt__['cmd.retcode'](cmd, python_shell=False)
680159
def reload_():
    '''
    
    '''

    ret = {'comment': [],
           'result': True}

    # If there a schedule defined in pillar, refresh it.
    if 'schedule' in __pillar__:
        out = __salt__['event.fire']({}, 'pillar_refresh')
        if out:
            ret['comment'].append('Reloaded schedule from pillar on minion.')
        else:
            ret['comment'].append('Failed to reload schedule from pillar on minion.')
            ret['result'] = False

    # move this file into an configurable opt
    sfn = '{0}/{1}/schedule.conf'.format(__opts__['config_dir'], os.path.dirname(__opts__['default_include']))
    if os.path.isfile(sfn):
        with salt.utils.files.fopen(sfn, 'rb') as fp_:
            try:
                schedule = salt.utils.yaml.safe_load(fp_)
            except salt.utils.yaml.YAMLError as exc:
                ret['comment'].append('Unable to read existing schedule file: {0}'.format(exc))

        if schedule:
            if 'schedule' in schedule and schedule['schedule']:
                out = __salt__['event.fire']({'func': 'reload', 'schedule': schedule}, 'manage_schedule')
                if out:
                    ret['comment'].append('Reloaded schedule on minion from schedule.conf.')
                else:
                    ret['comment'].append('Failed to reload schedule on minion from schedule.conf.')
                    ret['result'] = False
            else:
                ret['comment'].append('Failed to reload schedule on minion.  Saved file is empty or invalid.')
                ret['result'] = False
        else:
            ret['comment'].append('Failed to reload schedule on minion.  Saved file is empty or invalid.')
            ret['result'] = False
    return ret
255945
def reload(self, callback=None, errback=None):
        
        return self.load(reload=True, callback=callback, errback=errback)
512939
def reload_config(self):
        
        reload_cmd = self.commands.find_by_name('reload-alignak')
        if not reload_cmd:
            logger.error("Cannot restart Alignak : missing command"
                         " named 'reload-alignak'. Please add one")
            return
        logger.warning("RELOAD command : %s", reload_cmd)
        reload_cmd_line = reload_cmd.command_line
        logger.warning("RELOAD command : %s", reload_cmd_line)

        # Ok get an event handler command that will run in 15min max
        e_handler = EventHandler({'command': reload_cmd_line, 'timeout': 900})
        # Ok now run it
        e_handler.execute()
        # And wait for the command to finish
        while e_handler.status not in [ACT_STATUS_DONE, ACT_STATUS_TIMEOUT]:
            e_handler.check_finished(64000)

        log_level = 'info'
        if e_handler.status == ACT_STATUS_TIMEOUT or e_handler.exit_status != 0:
            logger.error("Cannot reload Alignak configuration: the 'reload-alignak' command failed"
                         " with the error code '%d' and the text '%s'.",
                         e_handler.exit_status, e_handler.output)
            log_level = 'error'
        # Ok here the command succeed, we can now wait our death
        self.send_an_element(make_monitoring_log(log_level, "RELOAD: %s" % (e_handler.output)))
704511
def reload(core = false, loaded = [], &code)
    Manager.connection.reload(core, loaded, &code)
  end
289894
def reload(self, reload_timeout=300, save_config=True):
        
        SAVE_CONFIG = re.compile(re.escape("System configuration has been modified. Save? [yes/no]: "))
        PROCEED = re.compile(re.escape("Proceed with reload? [confirm]"))
        IMAGE = re.compile("Passing control to the main image")
        BOOTSTRAP = re.compile("System Bootstrap")
        LOCATED = re.compile("Located .*")
        RETURN = re.compile(re.escape("Press RETURN to get started!"))

        response = "yes" if save_config else "no"

        #              0          1       2       3         4
        events = [SAVE_CONFIG, PROCEED, LOCATED, RETURN, self.username_re,
                  self.password_re, BOOTSTRAP, IMAGE, TIMEOUT, EOF]
        #              5              6          7       8      9

        transitions = [
            (SAVE_CONFIG, [0], 1, partial(a_send_line, response), 60),
            (PROCEED, [0, 1], 2, partial(a_send, "\r"), reload_timeout),
            (LOCATED, [2], 2, a_message_callback, reload_timeout),
            # if timeout try to send the reload command again
            (TIMEOUT, [0], 0, partial(a_send_line, self.reload_cmd), 10),
            (BOOTSTRAP, [2], -1, a_disconnect, reload_timeout),
            (IMAGE, [2], 3, a_message_callback, reload_timeout),
            (self.username_re, [3], -1, a_return_and_reconnect, 0),
            (self.password_re, [3], -1, a_return_and_reconnect, 0),
            (RETURN, [3], -1, a_return_and_reconnect, 0),
            (TIMEOUT, [2], -1, a_disconnect, 0),
            (EOF, [0, 1, 2, 3], -1, a_disconnect, 0)
        ]
        fsm = FSM("IOS-RELOAD", self.device, events, transitions, timeout=10)
        return fsm.run()
1007229
def reload_env(check, env):
    """"""
    envs = get_configured_envs(check)
    if not envs:
        echo_failure('No active environments found for `{}`.'.format(check))
        echo_info('See what is available to start via `ddev env ls {}`.'.format(check))
        abort()

    if not env:
        if len(envs) > 1:
            echo_failure('Multiple active environments found for `{}`, please specify one.'.format(check))
            echo_info('See what is active via `ddev env ls`.')
            abort()

        env = envs[0]

    if env not in envs:
        echo_failure('`{}` is not an active environment.'.format(env))
        echo_info('See what is active via `ddev env ls`.')
        abort()

    environment = create_interface(check, env)

    result = environment.restart_agent()

    if result.code:
        abort(result.stdout + result.stderr, code=result.code)
    else:
        echo_success('Successfully reloaded environment `{}`!'.format(env))
1021908
def load_config(self):
    """"""
    config = dict([(key, value) for key, value in iteritems(self.options)
                   if key in self.cfg.settings and value is not None])
    for key, value in iteritems(config):
      self.cfg.set(key.lower(), value)
105714
def reload(self):
        
        new = self.__class__.pickle_load(self.workdir)
        self = new
315249
def __load_configuration(self):
        
        handler_to_enable = filter(lambda h: h.keys is not None, handlers)
        for handler in handler_to_enable:
            if handler.name in self.kwargs:
                for k in handler.keys:
                    self.kwargs.update({k: True})

        self.config = self.configuration_class(self.app.config, **self.kwargs)
1334147
def _reload_maybe(self):
        
        ConfigModel = apps.get_model('djconfig.Config')

        data = dict(
            ConfigModel.objects
                .filter(key='_updated_at')
                .values_list('key', 'value'))

        if (not hasattr(self, '_updated_at') or
                self._updated_at != data.get('_updated_at')):
            self._reload()
186840
def reload(self):
        """"""
        pid = self._read_pidfile()
        if pid is None or pid != os.getpid():
            raise DaemonError(
                'Daemon.reload() should only be called by the daemon process '
                'itself')

        # Copy the current environment
        new_environ = os.environ.copy()
        new_environ['DAEMONOCLE_RELOAD'] = 'true'
        # Start a new python process with the same arguments as this one
        subprocess.call(
            [sys.executable] + sys.argv, cwd=self._orig_workdir,
            env=new_environ)
        # Exit this process
        self._shutdown('Shutting down for reload')
154234
def configure(self, settings_module=None, **kwargs):
        
        default_settings.reload()
        environment_var = self._kwargs.get(
            "ENVVAR_FOR_DYNACONF", default_settings.ENVVAR_FOR_DYNACONF
        )
        settings_module = settings_module or os.environ.get(environment_var)
        compat_kwargs(kwargs)
        kwargs.update(self._kwargs)
        self._wrapped = Settings(settings_module=settings_module, **kwargs)
        self.logger.debug("Lazy Settings configured ...")
969412
def reload
      # Make sure we have a fresh cache after we reload
      config.cache.clear if config.cache.respond_to?(:clear)

      # Reload dependencies as well, if necessary
      ActiveSupport::Dependencies.clear if defined?(ActiveSupport::Dependencies)

      # Use current configuration, but skip bundle and autoloading initializers
      current_config = config.marshal_dump.dup
      current_config.merge! :skip_bundle => true#, :skip_autoloading => true)

      initialize current_config
    end
87542
def reload_on_change(name)
      logger.debug "reload_on_change(#{name.inspect}), reload_disabled=#{self.reload_disabled?}"
      if changed = config_changed?(name) && reload?
        if self.cache_hash[name]
          flush_cache(name)  # flush cached config values.
          fire_on_load(name) # force on_load triggers.
        end
      end
      changed
    end
631378
@Override
    public void reload(ResourceConfig configuration) {
        ApplicationHandler applicationHandler = new ApplicationHandler(configuration, null, locator);
        applicationHandlerDelegate = new DefaultApplicationHandlerDelegate(applicationHandler);
        getApplicationHandler().onReload(this);
        applicationHandler.onStartup(this);
    }