Exemple #1
0
    def run(self):
        # Now is fun : get all the fun running :)
        my_dir = os.path.abspath(os.path.dirname(__file__))

        # Got in my own dir, and add my path in sys.path
        os.chdir(bottle_dir)
        #os.chdir(my_dir)
        sys.path.append(my_dir)

        # Check if the view dir really exist
        if not os.path.exists(bottle.TEMPLATE_PATH[0]):
            logger.log('ERROR : the view path do not exist at %s' % bottle.TEMPLATE_PATH)
            sys.exit(2)

        self.load_plugins()

        # Declare the whole app static files AFTER the plugin ones
        self.declare_common_static()

        print "Starting application"
        run(host=self.host, port=self.port)
Exemple #2
0
 def init_http(self):
     logger.info("Starting WS arbiter http socket")
     self.srv = run(host=self.host, port=self.port, server='wsgirefselect')
     # And we link our page
     route('/push_check_result', callback=get_page, method='POST')
Exemple #3
0
 def init_http(self):
     logger.info("[Ws_arbiter] Starting WS arbiter http socket")
     self.srv = run(host=self.host, port=self.port, server='wsgirefselect')
     # And we link our page
     route('/push_check_result', callback=get_page, method='POST')