Child: [bea16d] (diff)

Download this file

tasks.py    18 lines (12 with data), 412 Bytes

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