Revision: | 1.10 |
Committed: | Wed Aug 26 12:57:22 2009 UTC (15 years, 8 months ago) by farinafa |
Content type: | text/x-python |
Branch: | MAIN |
CVS Tags: | CRAB_2_7_2_p1, CRAB_2_7_1_branch_firstMERGE, CRAB_2_7_2, CRAB_2_7_2_pre4, CRAB_2_7_2_pre3, CRAB_2_7_2_pre2, CRAB_2_7_2_pre1, CRAB_2_7_1, fede_170310, CRAB_2_7_1_pre12, CRAB_2_7_1_pre11, CRAB_2_7_1_pre10, CRAB_2_7_1_pre9, CRAB_LumiMask, CRAB_2_7_lumi, from_LimiMask, CRAB_2_7_1_pre8, CRAB_2_7_1_pre6, CRAB_2_7_1_pre5, CRAB_2_7_1_wmbs_pre4, CRAB_2_7_1_pre4, CRAB_2_7_1_pre3, CRAB_2_6_6_pre6, CRAB_2_7_1_pre2, CRAB_2_6_6_pre5, CRAB_2_7_1_pre1, CRAB_2_6_6_pre4, CRAB_2_6_6_pre3, CRAB_2_6_6_pre2, CRAB_2_6_6_check, CRAB_2_6_6, CRAB_2_6_6_pre1, CRAB_2_7_0, CRAB_2_6_5, CRAB_2_7_0_pre8, CRAB_2_6_5_pre1, CRAB_2_7_0_pre7, CRAB_2_6_4, CRAB_2_7_0_pre6, CRAB_2_6_4_pre1, CRAB_2_7_0_pre5, CRAB_2_6_3_patch_2, CRAB_2_6_3_patch_2_pre2, CRAB_2_6_3_patch_2_pre1, CRAB_2_6_3_patch_1, CRAB_2_7_0_pre4, CRAB_2_7_0_pre3, CRAB_2_6_3, CRAB_2_6_3_pre5, CRAB_2_6_3_pre4, CRAB_2_6_3_pre3, CRAB_2_6_3_pre2, CRAB_2_7_0_pre2, CRAB_2_6_3_pre1, test_1, CRAB_2_7_0_pre1, CRAB_2_6_2, CRAB_2_6_2_pre2 |
Branch point for: | CRAB_multiout, CRAB_2_7_1_branch, Lumi2_8, CRAB_2_6_X_br |
Changes since 1.9: | +2 -1 lines |
Log Message: | Bugfix on CleanerServer client-side. Added a missing catch clause in workspace delete method. |
# | Content |
---|---|
1 | from Actor import * |
2 | from crab_exceptions import * |
3 | from crab_util import * |
4 | import common |
5 | import string |
6 | from ServerCommunicator import ServerCommunicator |
7 | from StatusServer import StatusServer |
8 | from Cleaner import Cleaner |
9 | |
10 | class CleanerServer(Cleaner): |
11 | |
12 | def __init__(self, cfg_params): |
13 | """ |
14 | constructor |
15 | """ |
16 | Cleaner.__init__(self, cfg_params) |
17 | self.cfg_params = cfg_params |
18 | |
19 | # init client server params... |
20 | CliServerParams(self) |
21 | return |
22 | |
23 | def run(self): |
24 | # get updated status from server |
25 | try: |
26 | stat = StatusServer(self.cfg_params) |
27 | stat.resynchClientSide() |
28 | except: |
29 | pass |
30 | |
31 | # check whether the action is allowable |
32 | self.check() |
33 | |
34 | # notify the server to clean the task |
35 | csCommunicator = ServerCommunicator(self.server_name, self.server_port, self.cfg_params) |
36 | taskuuid = str(common._db.queryTask('name')) |
37 | |
38 | try: |
39 | csCommunicator.cleanTask(taskuuid) |
40 | except Exception, e: |
41 | msg = "Client Server comunication failed about cleanJobs: task \n" + taskuuid |
42 | msg += "Only local working directory will be removed." |
43 | common.logger.debug( msg) |
44 | pass |
45 | |
46 | # TODO remove these lines once the integration completed |
47 | msg='' |
48 | msg+='functionality not yet available for the server. Work in progres \n' |
49 | msg+='only local working directory will be removed' |
50 | common.logger.info(msg) |
51 | # TODO - end |
52 | |
53 | # remove local structures |
54 | common.work_space.delete() |
55 | print 'directory '+common.work_space.topDir()+' removed' |
56 | return |
57 |