source: trunk/Monitoring/Failover/failover @ 841

Last change on this file since 841 was 841, checked in by jripsl, 11 years ago
  • add static class initialisation function.
  • Property svn:executable set to *
File size: 1.1 KB
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: failover 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
15from smon import dao
16
17class Failover():
18
19        @classmethod
20        def controlLoop(cls):
21                simulation=dao.get_simulation()
22
23                pass
24 
25def main():
26
27        # parse args
28        parser = argparse.ArgumentParser(prog='failover')
29        parser.add_argument('-v', dest='verbose',required=False,action='store_true')
30        args = parser.parse_args()
31
32        # check
33        if not os.path.exists(SMON.smon_home):
34                sys.exit(1)
35
36        SMON.init_singleton()
37
38        Failover.controlLoop()
39
40        SMON.free_singleton()
41
42
43if __name__ == '__main__':
44        try:
45                main()
46
47                sys.exit(0)
48
49        except Exception, e:
50
51                #traceback.print_exc()
52
53                sys.exit(1)
Note: See TracBrowser for help on using the repository browser.