def call_hook(self, hook_name, **kwargs):
        hook_kwargs = {'watcher': self, 'arbiter': self.arbiter,
                       'hook_name': hook_name}
        hook_kwargs.update(kwargs)
        if hook_name in self.hooks:
            try:
                result = self.hooks[hook_name](**hook_kwargs)
                self.notify_event("hook_success",
                                  {"name": hook_name, "time": time.time()})
            except Exception as error:
                logger.exception('Hook %r failed' % hook_name)
                result = hook_name in self.ignore_hook_failure
                self.notify_event("hook_failure",
                                  {"name": hook_name, "time": time.time(),
                                   "error": str(error)})

            return result
        else:
            return True
Refreshes the script index by re-reading the Groovy source files.
dataset/ETHPy150Open circus-tent/circus/circus/watcher.py/Watcher.call_hook--crossover with--dataset/ETHPy150Open espeed/bulbs/bulbs/groovy.py/GroovyScripts.refresh