Run the single hook specified by resolving all its prerequisites.
549305
def _RunSingleHook(self, hook_cls, executed_set, required=None):
    """"""
    # If we already ran do nothing.
    if hook_cls in executed_set:
      return

    # Ensure all the pre execution hooks are run.
    for pre_hook in hook_cls.pre:
      self._RunSingleHook(pre_hook, executed_set, required=hook_cls.__name__)

    # Now run this hook.
    cls_instance = hook_cls()
    if required:
      logging.debug("Initializing %s, required by %s", hook_cls.__name__,
                    required)
    else:
      logging.debug("Initializing %s", hook_cls.__name__)

    # Always call the Run hook.
    cls_instance.Run()
    executed_set.add(hook_cls)

    # Only call the RunOnce() hook if not already called.
    if hook_cls not in self.already_run_once:
      cls_instance.RunOnce()
      self.already_run_once.add(hook_cls)
215826
def _run_code(code, run_globals, init_globals=None,
              mod_name=None, mod_fname=None,
              mod_loader=None, pkg_name=None):
    """"""
    if init_globals is not None:
        run_globals.update(init_globals)
    run_globals.update(__name__ = mod_name,
                       __file__ = mod_fname,
                       __loader__ = mod_loader,
                       __package__ = pkg_name)
    exec code in run_globals
    return run_globals
429222
function injectHook(options, name, hook) {
  const existing = options[name]
  options[name] = existing
    ? Array.isArray(existing) ? existing.concat(hook) : [existing, hook]
    : [hook]
}
1316226
def _run_hooks(self):
        """"""
        for hook in self.hooks:
            getattr(self, hook)(self._state)
304668
def run(self, **options):
        """"""
        if not self.is_setup:
            self.setup()

        if self.twisted:
            self.run_with_twisted(**options)
        elif self.gunicorn:
            self.run_with_gunicorn(**options)
        else:
            self.run_with_werkzeug(**options)
1154016
private function dispatchModules($hook)
    {
        foreach ($this->modules[$hook] as $module) {
            if (method_exists($module, 'run')) {
                $module->run();
            }
        }
    }
1216220
def _execute(self) -> None:
        '''

        '''

        if hasattr(self, '_last_resolver_exception'):
            logger.warning('last exception from %s.%s:', self.__class__.__name__, self._last_resolver_exception[0], exc_info = self._last_resolver_exception[1])

        self.setup()
        self.run()
        self.check()
902581
def _sync_hooks(self, repos, asynchronous=True):
        """"""
        if not asynchronous:
            for repo_id in repos:
                try:
                    with db.session.begin_nested():
                        self.sync_repo_hook(repo_id)
                    db.session.commit()
                except RepositoryAccessError as e:
                    current_app.logger.warning(e.message, exc_info=True)
                except NoResultFound:
                    pass  # Repository not in DB yet
        else:
            # FIXME: We have to commit, in order to have all necessary data?
            db.session.commit()
            sync_hooks.delay(self.user_id, repos)
901948
def run(context, port):
    
    global ctx
    ctx = context
    app.run(port=port)
944837
def post_exec_hook(hook):
    
    #post_setupnode hook
    module_name = '.'.join([env.project_package_name,'deploy'])
    funcs_run = []
    try:
        imported = import_module(module_name)
        func = vars(imported).get(hook)
        if func:
            func()
            funcs_run.append(func)
    except ImportError:
        return

   #run per app
    for app in env.INSTALLED_APPS:
        if app == 'woven': continue
        module_name = '.'.join([app,'deploy'])
        try:
            imported = import_module(module_name)
            func = vars(imported).get(hook)
            if func and func not in funcs_run:
                func()
                funcs_run.append(func)
        except ImportError:
            pass
    import woven.deploy
    func = vars(woven.deploy).get(hook)
    if func and func not in funcs_run: func()
188247
def run(self, target, payload, instance_id=None, hook_id=None, **kwargs):
        
        requests.post(
            url=target,
            data=json.dumps(payload),
            headers={
                'Content-Type': 'application/json',
                'Authorization': 'Token %s' % settings.HOOK_AUTH_TOKEN
            }
        )
272467
def run_hook(hook_name, project_dir, context):
    
    script = find_hook(hook_name)
    if script is None:
        logger.debug('No {} hook found'.format(hook_name))
        return
    logger.debug('Running hook {}'.format(hook_name))
    run_script_with_context(script, project_dir, context)
630605
def run(self):
        """"""
        self._make_lib_file_symbolic_links()
        self._copy_each_include_files_to_include_dir()
        self._make_dep_lib_file_sym_links_and_copy_include_files()
        self.setup_py.add_patchs_to_build_without_pkg_config(
            self.rpm.lib_dir, self.rpm.include_dir
        )
        self.setup_py.apply_and_save()
        self._build_and_install()
860198
def _run_hooks(self, name, module):
        
        hooks = self.post_load_hooks.pop(name, [])

        for hook in hooks:
            hook(module)
945355
public static function runAll()
    {
        static::checkSapiEnv();
        static::init();
        static::lock();
        static::parseCommand();
        static::daemonize();
        static::initWorkers();
        static::installSignal();
        static::saveMasterPid();
        static::unlock();
        static::displayUI();
        static::forkWorkers();
        static::resetStd();
        static::monitorWorkers();
    }
1334454
def run
      require_dependencies
      require_frameworks
      init_reporters

      suite_passed = true

      Spinach.hooks.run_before_run

      features_to_run.each do |feature|
        feature_passed = FeatureRunner.new(feature, orderer: orderer).run
        suite_passed &&= feature_passed

        break if fail_fast? && !feature_passed
      end

      Spinach.hooks.run_after_run(suite_passed)

      suite_passed
    end
281525
def on_resolve(target, func, *args, **kwargs):
    
    return _register_hook(ON_RESOLVE, target, func, *args, **kwargs)