1 """
2 This class implements the IMonitoringService-interface and thus can be activated in .gangarc;
3 it then gets instantiated and the object gets callbacks whenever a job state changes in some
4 well-defined way (see methods below).
5
6 The real functionality, though, is implemented in another object we're just delegating the
7 callbacks to; the reason for this is that this class here is also loaded on the WN by the
8 job-wrapper script and should have as little dependencies as possible.
9
10 @author: Tim Muenchen
11 @date: 06.08.09
12 @organization: University of Wuppertal,
13 Faculty of mathematics and natural sciences,
14 Department of physics.
15 @copyright: 2007-2009, University of Wuppertal, Department of physics.
16 @license: ::
17
18 Copyright (c) 2007-2009 University of Wuppertal, Department of physics
19
20 Permission is hereby granted, free of charge, to any person obtaining a copy of this
21 software and associated documentation files (the "Software"), to deal in the Software
22 without restriction, including without limitation the rights to use, copy, modify, merge,
23 publish, distribute, sublicense, and/or sell copies of the Software, and to permit
24 persons to whom the Software is furnished to do so, subject to the following conditions:
25
26 The above copyright notice and this permission notice shall be included in all copies
27 or substantial portions of the Software.
28
29 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
30 INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
31 PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
32 LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
33 TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
34 OR OTHER DEALINGS IN THE SOFTWARE.
35 """
36 from Ganga.GPIDev.Adapters.IMonitoringService import IMonitoringService
37
38
40
43
51
52
58
59
65
66
72
73
74 - def fail(self,**opts):
79
80
81 - def kill(self,**opts):
86
87
93
94
104
105
113
114
116 """
117 Get the JEMMonitoringServiceHandler object that implements the callbacks defined
118 in IMonitoringService on a per-job basis
119 """
120 from GangaJEM.Lib.JEM.JEMMonitoringServiceHandler import JEMMonitoringServiceHandler
121
122
123
124 return JEMMonitoringServiceHandler.getInstance(self.job_info)
125