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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines