You should be able to pass the app_globals object as argument to the
asyncjob start_async_worker() call if it wasn't able to detect it by
itself.

Usually if placed inside the Globals __init__ method it should be able to.

On Mon, Jul 30, 2012 at 10:29 PM, notnow <[email protected]> wrote:
> 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.

-- 
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
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.

Reply via email to