diff --git a/service/src/service_utils/__init__.py b/service/src/service_utils/__init__.py index 6f127c9763..d8e1a43995 100644 --- a/service/src/service_utils/__init__.py +++ b/service/src/service_utils/__init__.py @@ -34,19 +34,19 @@ __license__ = "Apache License, Version 2.0" """ The license for the module """ -from . import async +from . import asynchronous from . import exceptions -from . import sync +from . import synchronous from . import system from . import threads -from .async import SelectPolling, EpollPolling, KqueuePolling, Connection +from .asynchronous import SelectPolling, EpollPolling, KqueuePolling, Connection from .exceptions import ServiceUtilsException, SocketProviderNotFound, SocketUpgraderNotFound,\ ServerRequestTimeout, ClientRequestTimeout, ServerResponseTimeout, ClientResponseTimeout,\ RequestClosed, PortStarvationReached, ConnectionChangeFailure -from .sync import AbstractServiceConnectionHandler, AbstractServiceConnectionlessHandler +from .synchronous import AbstractServiceConnectionHandler, AbstractServiceConnectionlessHandler from .system import ServiceUtils from .threads import ServiceAcceptingThread, ServiceExecutionThread -from .async import AbstractService as AbstractServiceAsync -from .sync import AbstractService as AbstractServiceSync +from .asynchronous import AbstractService as AbstractServiceAsync +from .synchronous import AbstractService as AbstractServiceSync diff --git a/service/src/service_utils/async.py b/service/src/service_utils/asynchronous.py similarity index 97% rename from service/src/service_utils/async.py rename to service/src/service_utils/asynchronous.py index 75a5a3c2c5..e005559fad 100644 --- a/service/src/service_utils/async.py +++ b/service/src/service_utils/asynchronous.py @@ -119,10 +119,10 @@ class AbstractService(object): """ service_utils = None - """ The service utils """ + """ The service utils system reference """ service_utils_plugin = None - """ The service utils plugin """ + """ The service utils plugin reference """ stop_flag = False """ The flag that controls the execution of the main loop diff --git a/service/src/service_utils/sync.py b/service/src/service_utils/synchronous.py similarity index 100% rename from service/src/service_utils/sync.py rename to service/src/service_utils/synchronous.py diff --git a/service/src/service_utils/system.py b/service/src/service_utils/system.py index 1e6ef51220..9a7e3b0f26 100644 --- a/service/src/service_utils/system.py +++ b/service/src/service_utils/system.py @@ -41,8 +41,8 @@ import colony -from . import sync -from . import async +from . import synchronous +from . import asynchronous from . import exceptions PORT_RANGES = ( @@ -52,8 +52,8 @@ """ The ranges of port available for services """ SERVICE_CLASSES_MAP = { - "sync" : sync.AbstractService, - "async" : async.AbstractService + "sync" : synchronous.AbstractService, + "async" : asynchronous.AbstractService } """ The map containing the various abstract service types """ @@ -101,7 +101,7 @@ def generate_service(self, parameters): # retrieves the service type from the parameters in order # to retrieve the proper (abstract) service class service_type = parameters.get("service_type", "sync") - service_class = SERVICE_CLASSES_MAP.get(service_type, sync.AbstractService) + service_class = SERVICE_CLASSES_MAP.get(service_type, synchronous.AbstractService) # creates the service "instance" using the abstract service class service_instance = service_class(self, self.plugin, parameters)