Switch to unified view

a b/ForgeTracker/forgetracker/tasks.py
1
import logging
2
3
from pylons import c
4
from allura.lib.decorators import task
5
from allura.lib import helpers as h
6
7
from allura import model as M
8
9
log = logging.getLogger(__name__)
10
11
12
@task
13
def update_bin_counts(app_config_id):
14
    app_config = M.AppConfig.query.get(_id=app_config_id)
15
    app = app_config.project.app_instance(app_config)
16
    with h.push_config(c, app=app):
17
        app.globals.update_bin_counts()