def main(): args = getArgs() params = getParameters(args) sys.argv = [sys.argv[0]] conf = service.prepareService() payloads = generatePayloads(**params) sendMessage(payloads=payloads, conf=conf)
def build_wsgi_app(): print "######### enter build_wsgi_app" conf = service.prepareService() uri = getUri(conf) appName = getAppName() app = deploy.loadapp(uri, name=appName) return app
def app_factory(global_config, **local_config): print "######### enter app_factory" conf = service.prepareService() # NOTE, add config and databse information to the request # by using pecan.hooks.PecanHook configHook = hooks.ConfigHook(conf) conn = db.getConnectionFromConfig(conf) databaseHook = hooks.DatabaseHook(conn) appHooks = [configHook, databaseHook] # NOTE, it needs add the line below pecan.configuration.set_config(dict(PECAN_CONFIG), overwrite=True) app = pecan.make_app(PECAN_CONFIG['app']['root'], hooks=appHooks) return app
def dbsync(): conf = service.prepareService() db.getConnectionFromConfig(conf).upgrade()
def main(): conf = service.prepareService() sm = cotyledon.ServiceManager() sm.add(sky.SkyService, workers=conf.sky.workers, args=(conf,)) sm.run()
def pollingd(): # initialize config conf = service.prepareService() PollingServiceManager(conf).run()