I posted this a couple weeks back. Had the same type of timeout with
the Sybase adapter for SO.
Here is my version of a dbping:
I'm sure this could be better, but here is my db_ping module if anyone
cares:
from sqlobject import *
import turbogears.scheduler
from turbogears.database import PackageHub
hub = PackageHub("clientportal")
__connection__ = hub
class OneRow(SQLObject):
""" SO definition of a one row table
"""
class sqlmeta:
table = 'CDS.ONEROW'
idName = 'COLX'
idType = str
colX = StringCol(length=1, dbName='COLX')
def db_ping():
for i in OneRow.select():
print i.colX
turbogears.scheduler.add_interval_task(action=db_ping,
taskname='db_ping', initialdelay=0, interval=180)
Regards,
Aaron
toffe wrote:
> Thanks a lot!
> Works both with a thread and the Scheduler, of which the latter is more
> convenient
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---