On 04/25/06 13:56, tomass wrote: > Hi Folks, > > I'm trying to fork a new process using os.fork(), and everything seems > to be working well, except that I need to then reference django models > from the forked process. This seems to mean I need to reimport all the > relevant modules into the function that's running as a forked process, > and I'm then getting an error as follows: > > server closed the connection unexpectedly > This probably means the server terminated abnormally > before or while processing the request. > > SET TIME ZONE 'Europe/London' > > This seems to happen whenever I try to use the DB api. Here's an > example of the import that works, but then a DB lookup that fails. > > from django.models.opsdashboard import commands, commandtypes > command = str(commands.get_object(pk=command_id)) > > Do I need to import something else as well. I would have thought if I'm > importing the models, I'm all good? >
Maybe you can use Georgs JobControl app from [1] as a starting point. [1] https://simon.bofh.ms/cgi-bin/trac-django-projects.cgi/wiki/DjangoStuff cheers Steven --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~----------~----~----~----~------~----~------~--~---