Getting a message:
No object (name: app_globals) has been registered for this thread
app_globals.py is attached.
the error occurs with
asyncjob_perform(doinit, 0)
*probably not significant but doinit is:*
def doinit(cntsys):
RATIOs=DBSession.query(Ratio).filter_by(Year=ratioyear).one()
val=DBSession.query(UnitCost).filter_by(Year=unityear).one()
page= 'Total Salary Allocation'
TheRow=[]
sys2=DBSession.query(Sys).all()
alltotinst=0
countsys=0
checkinit=[]
countsys=DBSession.query(Sys).count()
for row in sys2:
#count =count+1
cntsys=cntsys+1.39
asyncjob_set_progress(cntsys, "")
leano=row.id
howtogot=howtoget(page,TheRow,leano,admyear,RATIOs, val,CDFyear)
checkinit.append(howtogot)
I am following directions from here:
http://pypi.python.org/pypi/tgext.asyncjob/0.2.1
I have seen this ticket and tried unsuccessfully to make some modifications:
http://sourceforge.net/p/turbogears2/tickets/26/
Any suggestions?
--
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/turbogears/-/8dx_x-1mbh8J.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/turbogears?hl=en.
# -*- coding: utf-8 -*-
"""The application's Globals object"""
from tgext.asyncjob import start_async_worker
__all__ = ['Globals']
class Globals(object):
"""Container for objects available throughout the life of the application.
One instance of Globals is created during application initialization and
is available during requests via the 'app_globals' variable.
"""
def __init__(self):
"""Do nothing, by default."""
start_async_worker()
#self.foo = 'Test global!'