On Mon, 2006-09-25 at 23:12 +0000, Steve M wrote:
> Hi,
> 
> I have my Django project source files on a SMB share (it is a Linux
> file server).
> 
> I am running the development server on a different Linux computer,
> which has the SMB share mounted (with smbfs).
> 
> The autoreload feature causes the server to restart every second
> whether or not I have modified the files. If I use the --noreload
> option it stops this, but I like autoreload!
> 
> I've had a look at the django/utils/autoreload.py and, well, honestly
> it would be painful to work out why exactly it is happening and how it
> might be fixed. I don't really know the details of how SMB interacts
> with file stats.
> 
> Anyone know whether my setup is misguided? Or is a fix possible?

Since the autoreloader works by monitoring the mtime (last-modified
time) on the files, it is important that both machines have the same
concept of the current time.

Are the times on both boxes *exactly* in sync? Preferably using
something like NTP to ensure they stay that way? If not, then stat()
calls to check the last modified time on the remote machine are going to
look wrong (and possibly even from the future) on the machine you are
working on.

You could do a quick tests here by just running "date" and "ls -l <some
source file>" to see if they are roughly in sync.

I can't remember precisely how stat() behaves across SMB/CIFS mounts,
but it should be returning the correct last-modified times (although
with I've seen older Linux systems boxes periodically -- but not always
-- return dates from outer space, triggering no end of hilarity and
debugging of monitoring processes gone wild).

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
-~----------~----~----~----~------~----~------~--~---

Reply via email to