30 from ServiceControllerBase
import *
33 from concurrent.futures
import ThreadPoolExecutor, as_completed
38 """ Synchronous service controller class implementation. """
43 @param service Service - Service instance.
44 @param max_workers - Number of maximum workers to spawn
49 super(ServiceControllerAsync, self).
__init__(service)
55 Submit callback function to the worker thread and return the future.
56 @param clb Function - Callback function to execute on arrival of
59 @returns _future - The future.
61 _future = self.__threadPool.submit(self.
_worker_exec, msg, url, clb=clb)
67 payload = msg.req.make_payload()
68 files = msg.req.make_files()
70 if self._service.persistent:
75 for key, val
in resp.iteritems():
76 msg.resp.set(key, val)
def _post_persistent
Post Request using active session - persistent connection.
def run_job
Run the service.
def _post_session_once
Post Request while initiating a new session.