#14055: Fix sage-cleaner
----------------------------------+-----------------------------------------
       Reporter:  jdemeyer        |         Owner:  leif                        
 
           Type:  defect          |        Status:  needs_review                
 
       Priority:  critical        |     Milestone:  sage-5.9                    
 
      Component:  scripts         |    Resolution:                              
 
       Keywords:  orphans         |   Work issues:                              
 
Report Upstream:  N/A             |     Reviewers:  John Palmieri, Leif 
Leonhardy
        Authors:  Jeroen Demeyer  |     Merged in:                              
 
   Dependencies:                  |      Stopgaps:                              
 
----------------------------------+-----------------------------------------

Comment (by jhpalmieri):

 Maybe the problem is that `time.sleep(wait + 3)` used to be called before
 the first call to `cleanup()`, and now it's not. So now `cleanup()` can be
 called before any doctesting processes have started, so it returns zero,
 so sage-cleaner thinks there is nothing to be cleaned up and exits right
 away. I'm not sure why that results in a timeout in the doctesting, but
 anyway, this change fixes the problem for me:
 {{{
 #!diff
 diff --git a/sage-cleaner b/sage-cleaner
 --- a/sage-cleaner
 +++ b/sage-cleaner
 @@ -115,6 +115,7 @@
          else:
              wait = 10

 +        time.sleep(wait)
          # Initial cleanup, ignore time
          running_sages = cleanup()
          cleanup_time = 0.0
 }}}
 I don't know if the initial sleep should be for `wait` or a smaller
 number. Does it matter?

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/14055#comment:10>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to