You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mod_python-dev@quetz.apache.org by "Graham Dumpleton (JIRA)" <ji...@apache.org> on 2005/01/21 04:32:17 UTC

[jira] Created: (MODPYTHON-7) Autoreload works if mtime is newer, but not older.

Autoreload works if mtime is newer, but not older.
--------------------------------------------------

         Key: MODPYTHON-7
         URL: http://issues.apache.org/jira/browse/MODPYTHON-7
     Project: mod_python
        Type: Improvement
    Versions: 3.1.3    
    Reporter: Graham Dumpleton
    Priority: Minor


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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Resolved: (MODPYTHON-7) Autoreload works if mtime is newer, but not older.

Posted by "Nicolas Lehuen (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/MODPYTHON-7?page=history ]
     
Nicolas Lehuen resolved MODPYTHON-7:
------------------------------------

      Assign To: Nicolas Lehuen
     Resolution: Fixed
    Fix Version: 3.1.4

Done.

> Autoreload works if mtime is newer, but not older.
> --------------------------------------------------
>
>          Key: MODPYTHON-7
>          URL: http://issues.apache.org/jira/browse/MODPYTHON-7
>      Project: mod_python
>         Type: Improvement
>     Versions: 3.1.3
>     Reporter: Graham Dumpleton
>     Assignee: Nicolas Lehuen
>     Priority: Minor
>      Fix For: 3.1.4

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

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Closed: (MODPYTHON-7) Autoreload works if mtime is newer, but not older.

Posted by "Graham Dumpleton (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/MODPYTHON-7?page=all ]
     
Graham Dumpleton closed MODPYTHON-7:
------------------------------------


> Autoreload works if mtime is newer, but not older.
> --------------------------------------------------
>
>          Key: MODPYTHON-7
>          URL: http://issues.apache.org/jira/browse/MODPYTHON-7
>      Project: mod_python
>         Type: Improvement
>     Versions: 3.1.3
>     Reporter: Graham Dumpleton
>     Assignee: Nicolas Lehuen
>     Priority: Minor
>      Fix For: 3.2.7

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

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira