Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #850 (closed defect: wontfix)

Opened 13 years ago

Last modified 10 years ago

Fail to insert/update records from a scheduled job with SQLite

Reported by: ronald@… Owned by: anonymous
Priority: normal Milestone:
Component: TurboGears Version: 0.9a5
Severity: normal Keywords:
Cc:

Description

Trying to update/insert records to a SQLite database from within a scheduled job, doesn't work. A scheduled task run on it's own thread, and SQLite doesn't allow other threads but the main one to change the db.

Change History

comment:1 Changed 13 years ago by jorge.vargas

  • Milestone set to 0.9

I don't see how this is a problem with Turbogears

 http://www.sqlite.org/cvstrac/wiki?p=MultiThreading

did you go over the middle answer?

comment:2 Changed 13 years ago by jorge.vargas

  • Milestone changed from 0.9 to __future__

ronald any updates on this? I don't think there is anything that could be done on TG's side.

comment:3 Changed 12 years ago by xurble

You could document the workaround which is to open a new connection in the scheduler thread like so:

from turbogears.database import PackageHub?

hub = PackageHub?("myapp") con = connectionForURI(hub.uri)

MyClass?._connection = con

comment:4 Changed 11 years ago by Chris Arndt

  • Status changed from new to closed
  • Resolution set to wontfix

comment:5 Changed 10 years ago by anonymous

  • Milestone __future__ deleted

Milestone future deleted

Note: See TracTickets for help on using tickets.