Line | |
---|
1 | #!/usr/bin/python -u |
---|
2 | # -*- coding: ISO-8859-1 -*- |
---|
3 | |
---|
4 | ################################## |
---|
5 | # @program smon |
---|
6 | # @description simulation monitor |
---|
7 | # @copyright Copyright â(c)2009 Centre National de la Recherche Scientifique CNRS. |
---|
8 | # All Rights Reservedâ |
---|
9 | # @svn_file $Id: runchecker 2545 2013-02-01 09:58:10Z jripsl $ |
---|
10 | # @version $Rev: 2545 $ |
---|
11 | # @lastrevision $Date: 2013-02-01 10:58:10 +0100 (Fri, 01 Feb 2013) $ |
---|
12 | # @license CeCILL (http://dods.ipsl.jussieu.fr/jripsl/smon/LICENSE) |
---|
13 | ################################## |
---|
14 | |
---|
15 | from smon import dao |
---|
16 | |
---|
17 | class RunChecker(): |
---|
18 | |
---|
19 | @classmethod |
---|
20 | def check(cls): |
---|
21 | simulation=dao.getSimulation() |
---|
22 | |
---|
23 | def main(): |
---|
24 | |
---|
25 | # parse args |
---|
26 | parser = argparse.ArgumentParser(prog='runchecker') |
---|
27 | parser.add_argument('-v', dest='verbose',required=False,action='store_true') |
---|
28 | args = parser.parse_args() |
---|
29 | |
---|
30 | # check |
---|
31 | if not os.path.exists(SMON.smon_home): |
---|
32 | sys.exit(1) |
---|
33 | |
---|
34 | # open DB connections |
---|
35 | |
---|
36 | # initialize logger |
---|
37 | |
---|
38 | # |
---|
39 | |
---|
40 | |
---|
41 | # close DB connections |
---|
42 | |
---|
43 | |
---|
44 | if __name__ == '__main__': |
---|
45 | try: |
---|
46 | main() |
---|
47 | |
---|
48 | sys.exit(0) |
---|
49 | |
---|
50 | except Exception, e: |
---|
51 | |
---|
52 | #traceback.print_exc() |
---|
53 | |
---|
54 | sys.exit(1) |
---|
Note: See
TracBrowser
for help on using the repository browser.