On Mon, 2008-08-18 at 16:42 -0700, wnielson wrote:
> Thanks for the quick response.  Yes, I did do some searching and ran
> across the post about NFS (and yes I am using an NFS mount).  However,
> I can solve the problem by bypassing the `save` method like so:
> 
> from django.core.files import File
> 
> f = open('my_filename.jpg', 'w')
> myfile = File(f)
> myfile.write(image.read())
> sm.image = myfile
> 
> I suppose this method works because it bypasses the `save` method's
> use of the lock.

Precisely. Which makes it subject to race conditions and lots of
problems because of that.

You could also avoid the problem by not saving your file at all. Both
options are just symptom patching, rather than a solution to the
problem. :-)

Looks like we need to switch from flock-based locking to fcntl-based
locking where available. *sigh*. I'll take care of opening a ticket for
this.

Regards,
Malcolm


--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to