Did I find the right examples for you? yes no

All Samples(4)  |  Call(4)  |  Derive(0)  |  Import(0)

src/s/t/statusboard-HEAD/statusboard/core/tasks.py   statusboard(Download)
def gather_request(plugin_name, user, args, kwargs):
    plugin = plugin_registry.get(plugin_name)
    if user:
        kwargs['user'] = User.objects.get(id=user)
    with transaction.commit_on_success():
    for gather in GatherRequest.objects.all().for_update():
        log.debug('Running gather request for plugin %s', gather.plugin)
        plugin = plugin_registry.get(gather.plugin)
        if plugin is None:
            log.warning('Plugin %s not found', gather.plugin)
def plugin_tick(frequency, plugin_name):
    plugin = plugin_registry.get(plugin_name)
    with transaction.commit_on_success():
        getattr(plugin['instance'], 'tick_%s'%frequency)(plugin_tick.get_logger())
 

src/s/t/statusboard-HEAD/statusboard/core/views.py   statusboard(Download)
def render_widget(request, opts, css_out=None, js_out=None):
    plugin = plugin_registry.get(opts['type'])
    if plugin is None:
        return render_error(request, opts)
    ret = plugin['instance'].render(request, opts)