ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CRAB/python/CleanerServer.py
(Generate patch)

Comparing COMP/CRAB/python/CleanerServer.py (file contents):
Revision 1.1 by mcinquil, Tue Jul 17 17:56:09 2007 UTC vs.
Revision 1.6 by spiga, Tue May 26 10:23:00 2009 UTC

# Line 1 | Line 1
1   from Actor import *
2   from crab_exceptions import *
3 from crab_logger import Logger
4 from StatusServer import StatusServer
3   import common
4   import string
5  
# Line 16 | Line 14 | class CleanerServer(Actor):
14          """
15          Check whether no job is still running or not yet retrieved
16          """
17 <        obj = StatusServer(self.cfg_params)
18 <        obj.run()
19 <
20 <        pass
17 >        # get updated status from server
18 >        try:
19 >            from StatusServer import StatusServer
20 >            stat = StatusServer(self.cfg_params)
21 >            stat.resynchClientSide()
22 >        except:
23 >            pass
24  
25      def run(self):
26          """
27          remove all
28 <        """
28 >
29          if common.jobDB.nJobs()>0:
30              self.check()
31  
# Line 38 | Line 39 | class CleanerServer(Actor):
39              common.work_space.delete()
40              print ( 'crab. directory '+tempWorkSpace+' removed' )
41          else:
42 <            common.logger.message ( 'Impossible to remove: not all jobs are yet finished\n      (you maight kill these jobs and then clean the task)')
42 >            common.logger.info ( 'Impossible to remove: not all jobs are yet finished\n      (you maight kill these jobs and then clean the task)')
43 >        """
44 >        msg=''  
45 >        msg+='functionality not yet available for the server. Work in progres \n'
46 >        msg+='only local worling directory will be removed'
47 >        #msg+='planned for CRAB_2_5_0'
48 >        common.logger.info(msg)
49 >        common.work_space.delete()
50 >        print 'directory '+common.work_space.topDir()+' removed'

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines