Issue Details (XML | Word | Printable)

Key: MODPYTHON-7
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Nicolas Lehuen
Reporter: Graham Dumpleton
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
mod_python

Autoreload works if mtime is newer, but not older.

Created: 21/Jan/05 12:21 PM   Updated: 05/Mar/06 01:35 PM
Return to search
Component/s: None
Affects Version/s: 3.1.3
Fix Version/s: 3.2.7

Time Tracking:
Not Specified

Resolution Date: 22/Jan/05 09:55 PM


 Description  « Hide
The apache.import_module() method only reloads a Python module if the modification time of the file on disk is newer. This means that if one restores an old version of a file from backup, eg., by using "mv" command from another location, it will not reload it and it is necessary to touch the file or restart Apache.

The check in apache.py, instead of being just:

  if mtime > oldmtime:

could perhaps be:

  if mtime != oldmtime:

I don't believe this would cause any wider issues, but might be due some thought first.

The various settings of mtime and oldmtime above that in the code, ie., to 0 or 1, will also have to be reviewed to ensure this change doesn't break anything.

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
No work has yet been logged on this issue.