コード例 #1
0
def start_function_mapping_handler(orchestrator):
    tg = threadgroup.ThreadGroup(1)
    engine_client = rpc.get_engine_client()

    tg.add_timer(300,
                 handle_function_service_expiration,
                 ctx=context.Context(),
                 engine_client=engine_client,
                 orchestrator=orchestrator)
    _periodic_tasks[constants.PERIODIC_FUNC_MAPPING_HANDLER] = tg

    LOG.info('Function mapping handler started.')
コード例 #2
0
def start_job_handler():
    tg = threadgroup.ThreadGroup(1)
    engine_client = rpc.get_engine_client()

    tg.add_timer(
        3,
        handle_job,
        engine_client=engine_client,
    )
    _periodic_tasks[constants.PERIODIC_JOB_HANDLER] = tg

    LOG.info('Job handler started.')
コード例 #3
0
def start_job_handler():
    """Start job handler thread.

    Job handler is supposed to be running with api service.
    """
    worker = periodics.PeriodicWorker([])
    engine_client = rpc.get_engine_client()
    worker.add(handle_job, engine_client=engine_client)
    _periodic_tasks[constants.PERIODIC_JOB_HANDLER] = worker

    thread = threading.Thread(target=worker.start)
    thread.setDaemon(True)
    thread.start()

    LOG.info('Job handler started.')
コード例 #4
0
def start_job_handler():
    """Start job handler thread.

    Job handler is supposed to be running with api service.
    """
    tg = threadgroup.ThreadGroup(1)
    engine_client = rpc.get_engine_client()

    tg.add_timer(
        3,
        handle_job,
        engine_client=engine_client,
    )
    _periodic_tasks[constants.PERIODIC_JOB_HANDLER] = tg

    LOG.info('Job handler started.')
コード例 #5
0
    def __init__(self, *args, **kwargs):
        self.storage_provider = storage_base.load_storage_provider(CONF)
        self.engine_client = rpc.get_engine_client()
        self.type = 'function'

        super(FunctionsController, self).__init__(*args, **kwargs)
コード例 #6
0
ファイル: runtime.py プロジェクト: baikai/qinling
    def __init__(self, *args, **kwargs):
        self.engine_client = rpc.get_engine_client()
        self.type = 'runtime'

        super(RuntimesController, self).__init__(*args, **kwargs)
コード例 #7
0
ファイル: execution.py プロジェクト: huzhengchuan/qinling
    def __init__(self, *args, **kwargs):
        self.engine_client = rpc.get_engine_client()
        self.type = 'execution'

        super(ExecutionsController, self).__init__(*args, **kwargs)
コード例 #8
0
    def __init__(self, *args, **kwargs):
        self.type = 'webhook'
        self.engine_client = rpc.get_engine_client()
        self.qinling_endpoint = keystone_utils.get_qinling_endpoint()

        super(WebhooksController, self).__init__(*args, **kwargs)