Good day, ArchipA.
I tried to play with PostConnectionTask a lot of times, but failed.
I tried this :
#
from gluon.contrib.wsgihooks import PostConnectionTask, localposttasks
import logging
#
class dummy(PostConnectionTask):
def __init__(self):
PostConnectionTask.__init__(self, request)
# def run(self): # Commented
logging.warning("Hello ")
from time import sleep
sleep(10)
logging.warning(self.env)
logging.warning("World!")
sleep(10)
logging.warning("PLEASEEE")
#
def CtrlFunc():
localposttasks.append( dummy() )
return dict( header="CTRL", content='Automation started' )
#
I know i must be doing something very very wrong because the page
loads very very slow and all i see is "Automation Started". That's
all.
I searched for other PostConnectionTask examples on the forum or
official site, but didn't find much.
Can anyone post a working example?
Thank you.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" 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/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---