Esempio n. 1
0
    def __init__(self, config, services_list):
        self.config = config

        urls = []

        for each in services_list:
            if hasattr(each, 'uri'):
                # this is the old middleware and dataservice
                uri, cls = each.uri, each
            else:
                # this is middleware_app (soon to be deprecated)
                uri, cls = each

            if isinstance(uri, basestring):
                uri = (uri, )

            for a_uri in uri:
                urls.append(a_uri)
                urls.append(classWithPartialInit(cls, config))

        self.urls = tuple(urls)

        web.webapi.internalerror = web.debugerror
        web.config.debug = False
        self._identify()
        self._wsgi_func = web.application(self.urls, globals()).wsgifunc()
Esempio n. 2
0
    def __init__(self, config, services_list):
        self.config = config

        urls = []

        for each in services_list:
            if hasattr(each, 'uri'):
                # this is the old middleware and dataservice
                uri, cls = each.uri, each
            else:
                # this is middleware_app (soon to be deprecated)
                uri, cls = each

            if isinstance(uri, basestring):
                uri = (uri, )

            for a_uri in uri:
                urls.append(a_uri)
                urls.append(classWithPartialInit(cls, config))

        self.urls = tuple(urls)

        web.webapi.internalerror = web.debugerror
        web.config.debug = False
        self._identify()
        self._wsgi_func = web.application(self.urls, globals()).wsgifunc()
Esempio n. 3
0
 def __init__(self, config, services_list):
     self.config = config
     self.urls = tuple(y for a_tuple in
                      ((x.uri, classWithPartialInit(x, config))
                         for x in services_list) for y in a_tuple)
     #self.config.logger.info(str(self.urls))
     web.webapi.internalerror = web.debugerror
     web.config.debug = False
     self._identify()
     self._wsgi_func = web.application(self.urls, globals()).wsgifunc()
Esempio n. 4
0
 def __init__(self, config, services_list):
     self.config = config
     self.urls = tuple(y for a_tuple in ((x.uri,
                                          classWithPartialInit(x, config))
                                         for x in services_list)
                       for y in a_tuple)
     #self.config.logger.info(str(self.urls))
     web.webapi.internalerror = web.debugerror
     web.config.debug = False
     self._identify()
     self._wsgi_func = web.application(self.urls, globals()).wsgifunc()
Esempio n. 5
0
    def __init__(self, config, services_list):
        self.config = config

        urls = []
        for each in services_list:
            if hasattr(each, "uri"):
                # this is the old middleware
                uri, cls = each.uri, each
            else:
                # this is the new middleware_app
                uri, cls = each
            urls.append(uri)
            urls.append(classWithPartialInit(cls, config))
        self.urls = tuple(urls)

        web.webapi.internalerror = web.debugerror
        web.config.debug = False
        self._identify()
        self._wsgi_func = web.application(self.urls, globals()).wsgifunc()
Esempio n. 6
0
    def __init__(self, config, services_list):
        self.config = config

        urls = []
        for each in services_list:
            if hasattr(each, 'uri'):
                # this is the old middleware
                uri, cls = each.uri, each
            else:
                # this is the new middleware_app
                uri, cls = each
            urls.append(uri)
            urls.append(classWithPartialInit(cls, config))
        self.urls = tuple(urls)

        web.webapi.internalerror = web.debugerror
        web.config.debug = False
        self._identify()
        self._wsgi_func = web.application(self.urls, globals()).wsgifunc()
Esempio n. 7
0
#-------------------------------------------------------------------------------
import socorro.storage.crashstorage as cstore
crashStoragePool = cstore.CrashStoragePool(config,
                                    config.primaryStorageClass)
config.crashStoragePool = crashStoragePool

legacyThrottler = cstore.LegacyThrottler(config)
config.legacyThrottler = legacyThrottler

#-------------------------------------------------------------------------------
web.webapi.internalerror = web.debugerror
web.config.debug = False
servicesList = (wscol.Collector,
               )
urls = tuple(y for aTuple in ((x.uri, cpart.classWithPartialInit(x, config))
                    for x in servicesList) for y in aTuple)
logger.info(str(urls))

if config.modwsgiInstallation:
    logger.info('This is a mod_wsgi installation')
    application = web.application(urls, globals()).wsgifunc()
else:
    logger.info('This is stand alone installation without mod_wsgi')
    import socorro.webapi.webapp as sweb
    app =  sweb.StandAloneWebApplication(config.serverIPAddress,
                                         config.serverPort,
                                         urls,
                                         globals())

if __name__ == "__main__":
Esempio n. 8
0
config.logger = logger

#-------------------------------------------------------------------------------
import socorro.storage.crashstorage as cstore
crashStoragePool = cstore.CrashStoragePool(config, config.primaryStorageClass)
config.crashStoragePool = crashStoragePool

legacyThrottler = cstore.LegacyThrottler(config)
config.legacyThrottler = legacyThrottler

#-------------------------------------------------------------------------------
web.webapi.internalerror = web.debugerror
web.config.debug = False
servicesList = (wscol.Collector, )
urls = tuple(y for aTuple in ((x.uri, cpart.classWithPartialInit(x, config))
                              for x in servicesList) for y in aTuple)
logger.info(str(urls))

if config.modwsgiInstallation:
    logger.info('This is a mod_wsgi installation')
    application = web.application(urls, globals()).wsgifunc()
else:
    logger.info('This is stand alone installation without mod_wsgi')
    import socorro.webapi.webapp as sweb
    app = sweb.StandAloneWebApplication(config.serverIPAddress,
                                        config.serverPort, urls, globals())

if __name__ == "__main__":
    try:
        app.run()