예제 #1
0
def setup (app):
  legexpapi = XMLRPCHandler('legacyexpedientapi')
  legexpapi.connect(app, '/core/legacyexpedientapi/xmlrpc/')
  #legexpapi = AMLegExpAPI(app)
  legexpapi.register_instance(AMLegExpAPI(app.logger))
  app.logger.info("[LegacyExpedientAPI] Loaded.")
  return legexpapi
예제 #2
0
def setup(app):
    handler = XMLRPCHandler('XMLRPC')
    handler.connect(app, '/RPC2')
    handler.connect(app, '/XMLRPC')
    handler.register_instance(NipapXMLRPC())

    return app
def setup(app):
    legexpapi = XMLRPCHandler('legacyexpedientapi')
    legexpapi.connect(app, '/core/legacyexpedientapi/xmlrpc/')
    #legexpapi = AMLegExpAPI(app)
    legexpapi.register_instance(AMLegExpAPI(app.logger))
    app.logger.info("[LegacyExpedientAPI] Loaded.")
    return legexpapi
예제 #4
0
 def registerXMLRPC(self, unique_service_name, instance, endpoint):
     """Register the receiver.
     {unique_service_name} just has to be a unique name (dont ask why).
     The {instance} is an object (an {Dispatcher} instance) providing the methods which get called via the XMLRPC enpoint.
     {endpoint} is the mounting point for the XML RPC interface (e.g. '/geni' )."""
     handler = XMLRPCHandler(unique_service_name)
     handler.connect(self._flaskapp.app, endpoint)
     handler.register_instance(instance)
예제 #5
0
 def registerXMLRPC(self, unique_service_name, instance, endpoint):
     """Register the receiver.
     {unique_service_name} just has to be a unique name (dont ask why).
     The {instance} is an object (an {Dispatcher} instance) providing the methods which get called via the XMLRPC enpoint.
     {endpoint} is the mounting point for the XML RPC interface (e.g. '/geni' )."""
     handler = XMLRPCHandler(unique_service_name)
     handler.connect(self._flaskapp.app, endpoint)
     handler.register_instance(instance)
예제 #6
0
파일: xmlrpc.py 프로젝트: Cougar/NIPAP
def setup():
    app = Flask('nipap.xmlrpc')
    Compress(app)

    handler = XMLRPCHandler('XMLRPC')
    handler.connect(app, '/RPC2')
    handler.connect(app, '/XMLRPC')
    handler.register_instance(NipapXMLRPC())

    return app
예제 #7
0
def setup():
    app = Flask('nipap.xmlrpc')
    Compress(app)

    handler = XMLRPCHandler('XMLRPC')
    handler.connect(app, '/RPC2')
    handler.connect(app, '/XMLRPC')
    handler.register_instance(NipapXMLRPC())

    return app
예제 #8
0
파일: app.py 프로젝트: lygntx/scrapyc
flask_app.logger.addHandler(logging.FileHandler(_log_file))

for _config in ["LOG_PATH","DATA_PATH","PROJECT_PATH","HISTORY_PATH"]:
    flask_app.config[_config] = coreapp.config[_config]


flask_app.config["coreapp"] = coreapp
flask_app.config["scheduler"] = coreapp.scheduler

#flask_app.config["db_session"] = coreapp.config.get("db_session")


from .proxy import SchedulerProxy
_handler = XMLRPCHandler('api')
_scheduler_proxy = SchedulerProxy(flask_app)
_handler.register_instance(_scheduler_proxy)
_handler.connect(flask_app, '/api')    
flask_app.config["scheduler_proxy"] = _scheduler_proxy


from apscheduler.schedulers.tornado import TornadoScheduler
import os

# The "apscheduler." prefix is hard coded
apscheduler = TornadoScheduler({
    'apscheduler.jobstores.default': {
        'type': 'sqlalchemy',
        'url': 'sqlite:///'+os.path.join(flask_app.config["DATA_PATH"],"apscheduler.db")
    },

    'apscheduler.job_defaults.coalesce': 'true',
예제 #9
0
파일: sfaapi.py 프로젝트: HalasNet/felix
def setup(app):
    sfa_api = XMLRPCHandler("sfaapi")
    sfa_api.connect(app, "/sfa/2/")
    sfa_api.register_instance(SfaApi(app.logger))
    app.logger.info("[SfaApi] Loaded.")
    return sfa_api
예제 #10
0
파일: gapi2.py 프로젝트: HalasNet/felix
def setup (app):
  gapi2 = XMLRPCHandler('gapi2')
  gapi2.connect(app, '/foam/gapi/2')
  gapi2.register_instance(AMAPIv2(app.logger))
  app.logger.info("[GAPIv2] Loaded.")
  return gapi2
예제 #11
0
def setup(app):
    sfa_api = XMLRPCHandler('sfaapi')
    sfa_api.connect(app, '/sfa/2/')
    sfa_api.register_instance(SfaApi(app.logger))
    app.logger.info("[SfaApi] Loaded.")
    return sfa_api
예제 #12
0
def setup (app):
  gapi1 = XMLRPCHandler('gapi1')
  gapi1.connect(app, '/foam/gapi/1')
  gapi1.register_instance(AMAPIv1(app.logger))
  app.logger.info("[GAPIv1] Loaded.")
  return gapi1
예제 #13
0
def setup(app):
    gapi2 = XMLRPCHandler('gapi2')
    gapi2.connect(app, '/foam/gapi/2')
    gapi2.register_instance(AMAPIv2(app.logger))
    app.logger.info("[GAPIv2] Loaded.")
    return gapi2