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