/src/CassandraMonitor/mycassandramanager/cassandramanager.py
Python | 55 lines | 35 code | 3 blank | 17 comment | 0 complexity | 6ade3f70d348c8bca7f35f61a79e163a MD5 | raw file
- #!/usr/bin/env python
- # -*- coding: utf-8 -*-
- #
- # Licensed under the Apache License, Version 2.0 (the "License"); you may
- # not use this file except in compliance with the License. You may obtain
- # a copy of the License at
- #
- # http://www.apache.org/licenses/LICENSE-2.0
- #
- # Unless required by applicable law or agreed to in writing, software
- # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- # License for the specific language governing permissions and limitations
- # under the License.
- #Thu Dec 15 15:45:21 GMT 2011
- """
- this instigates the web2py framework, instigates the handlers
- and starts the main application 'loop' on each node
- """
- __author__ = "Chris T. Cheyne"
- __copyright__ = "Copyright 2011, The Cassandra Manager Project"
- __credits__ = ["Chris Cheyne"]
- __license__ = "GPL"
- __version__ = "0.0.1"
- __maintainer__ = "Chris T. Cheyne"
- __email__ = "maintainer@cassandra-manager.org"
- __status__ = "Alpha"
- import sys
- import os
- import imp
- import mylogger.logger as loggingsystem
- SYSLOG = loggingsystem.MyLogger()
- SYSLOG.l.debug('booting....')
- import myconfig.config as config
- SYSCONFIG = config.MyConfig()
- SYSLOG.l.info('mysql host is %s ' % SYSCONFIG.conf['mysql']['host'])
- # MAIN LOOP
- class CassandraManager():
- def __init__(self):
- self.main()
- def main(self):
- """ our default bootstrapper. calls each module in turn. """
- # note we should be called from cassandramonitor.py
- if __name__ == "__main__":
- main()