Re: Problem with threads accessing MySQL database

2006-04-12 Thread kopikopiko
Hi Dave, Thanks for your comment. That is an ingenious way of getting your tasks executed by views. Django is so new to me that I'm clinging to my first conception of how task timing might work lest I become completely lost :-) I'm working on a system to automate interactive TV and synchronise

Re: Problem with threads accessing MySQL database

2006-04-12 Thread kopikopiko
Hi Dave, Thanks for your comment. That is an ingenious way of getting your tasks executed by views. Django is so new to me that I'm clinging to my first conception of how task timing might work lest I become completely lost :-) I'm working on a system to automate interactive TV and synchronise

Re: Problem with threads accessing MySQL database

2006-04-12 Thread kopikopiko
Hi Eugene, Thank you for your advice - that makes sense. At the level I'm working at (first project) and given that locking the single connection doesn't kill my application (actions can still be performed in real time and the only delay is to writing logs and statuses back to the database) I'm

Re: Problem with threads accessing MySQL database

2006-04-12 Thread DavidA
Hi kopikopiko, I thought I'd chime in on how I'm solving a similar problem. I also have a task scheduling app written in Django, but I actually run the tasks through Django rather than outside of it: I have a special view (/tasks/trigger) which remembers the last time the view ran and checks for

Re: Problem with threads accessing MySQL database

2006-04-11 Thread Eugene Lazutkin
kopikopiko wrote: > > I run a standalone python programme (called kron) which looks for new > events in the table and spawns a thread to process them: This is exactly why you have the problem. It looks like you have a connection, which is shared across several threads. It's a no-no. This

Re: Problem with threads accessing MySQL database

2006-04-11 Thread kopikopiko
Hi Eugene, I'm not getting the error on a web page as such. The project is to create a scheduling engine in python which uses Django for its interface. The error comes out of the python programme run from DOS. Essentially I'm using the Django web interface to maintain a list of events: class

Re: Problem with threads accessing MySQL database

2006-04-11 Thread Eugene Lazutkin
kopikopiko wrote: > Thanks very much for your answers. > > I svn'ed up to 2654 but am still seeing errors. The errors happen more > frequently after the upgrade. What I'm getting back is: > > File "C:\Django\hodie\kron.py", line 109, in ?db_save(this_inst) > File

Re: Problem with threads accessing MySQL database

2006-04-11 Thread kopikopiko
Thanks very much for your answers. I svn'ed up to 2654 but am still seeing errors. The errors happen more frequently after the upgrade. What I'm getting back is: File "C:\Django\hodie\kron.py", line 109, in ?db_save(this_inst) File "C:\Django\hodie\kron.py", line 14, in db_save

Re: Problem with threads accessing MySQL database

2006-04-10 Thread Andy Dustman
On 4/10/06, Eugene Lazutkin <[EMAIL PROTECTED]> wrote: > > kopikopiko wrote: > > Hi, > > > > I have an application set up under: > > Django 0.91 > > Windows 2000 Server > > MySQL 5.0 > > which reads scheduled events from a table then spawns threads (using > > the Thread module) to

Re: Problem with threads accessing MySQL database

2006-04-10 Thread Eugene Lazutkin
kopikopiko wrote: > Hi, > > I have an application set up under: > Django 0.91 > Windows 2000 Server > MySQL 5.0 > which reads scheduled events from a table then spawns threads (using > the Thread module) to process the events and update the table. As soon > as my threads started

Problem with threads accessing MySQL database

2006-04-10 Thread kopikopiko
Hi, I have an application set up under: Django 0.91 Windows 2000 Server MySQL 5.0 which reads scheduled events from a table then spawns threads (using the Thread module) to process the events and update the table. As soon as my threads started writing to the database I ran into