Skip to content
Snippets Groups Projects
Commit 1894eaf3 authored by David Trattnig's avatar David Trattnig
Browse files

Due to engine-core#18 backchannel not needed #107

parent f09fbf52
No related branches found
No related tags found
No related merge requests found
......@@ -68,10 +68,6 @@ api_engine_store_clock="http://localhost:8008/api/v1/clock"
# Engine API endpoint to store health information
api_engine_store_health="http://localhost:8008/api/v1/source/health/${ENGINE_NUMBER}"
## ENGINE-CORE ##
# Host and port of the local engine backchannel (Network Socket for e.g. sending track service updates)
api_engine_control_host="localhost:1337"
[scheduler]
# Database settings: Use 'postgresql', 'sqlite' or 'mysql'. In case of SQLite the "db_name" is the name of the file.
db_type="postgresql"
......
......@@ -68,10 +68,6 @@ api_engine_store_clock="${ENGINE_API_BASE_URL}api/v1/clock"
# Engine API endpoint to store health information
api_engine_store_health="${ENGINE_API_BASE_URL}api/v1/source/health/${ENGINE_NUMBER}"
## ENGINE-CORE ##
# Host and port of the local engine backchannel (Network Socket for e.g. sending track service updates)
api_engine_control_host="0.0.0.0:1337"
[scheduler]
# Database settings: Use 'postgresql' or 'mysql'
db_type="postgresql"
......
......@@ -54,8 +54,11 @@ class EngineControlInterface:
self.engine = engine
self.config = AuraConfig.config()
self.logger = logging.getLogger("AuraEngine")
self.logger.info(SU.yellow("[ECI] Engine Control Interface starting ..."))
self.sci = SocketControlInterface.get_instance(event_dispatcher)
if self.config.get("enable_sci", "false") == "true":
self.logger.info(SU.yellow("[ECI] Socket Control Interface starting ..."))
self.sci = SocketControlInterface.get_instance(event_dispatcher)
else:
self.logger.debug(SU.yellow("[ECI] Socket Control Interface disabled"))
def terminate(self):
"""
......@@ -74,6 +77,7 @@ class SocketControlInterface:
service is primarily utilized to store new playlogs.
"""
DEFAULT_CONTROL_HOST = "0.0.0.0:1337"
ACTION_ON_METADATA = "on_metadata"
instance = None
......@@ -97,7 +101,8 @@ class SocketControlInterface:
self.config = AuraConfig.config()
self.logger = logging.getLogger("AuraEngine")
self.event_dispatcher = event_dispatcher
url_parts = self.config.get("api_engine_control_host").split(":")
default_host = SocketControlInterface.DEFAULT_CONTROL_HOST
url_parts = self.config.get("api_engine_control_host", default_host).split(":")
host = url_parts[0]
port = int(url_parts[1])
thread = Thread(target=self.run, args=(self.logger, host, port))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment