diff --git a/config/sample-development.engine.ini b/config/sample-development.engine.ini index 754235e6b1726255ed1a1a5463d591ebeeb1e020..572b1dfaff556e1ab8513b992d4767da22fc620e 100644 --- a/config/sample-development.engine.ini +++ b/config/sample-development.engine.ini @@ -1,8 +1,10 @@ +############################################## +# Engine Configuration # +############################################## -################### -# Engine Settings # -################### - +[general] +# Path to the engine-core socket directory relative to the engine project root +socket_dir="../engine-core/socket" [database] db_user="aura" @@ -112,7 +114,7 @@ daemongroup="engineuser" daemonuser="engineuser" [socket] -socketdir="/home/username/code/aura/engine/src/liquidsoap" +socket_dir="/home/username/code/aura/engine/src/liquidsoap" [audiosources] audio_source_folder="/var/audio/source" diff --git a/config/sample-docker.engine.ini b/config/sample-docker.engine.ini index 9552d3438d3aace8e613e06e02cd15903dc82678..51349fd330ddbda05fa2bb905f735e4594b5832d 100644 --- a/config/sample-docker.engine.ini +++ b/config/sample-docker.engine.ini @@ -1,8 +1,10 @@ +############################################## +# Engine Configuration # +############################################## -################### -# Engine Settings # -################### - +[general] +# Path to the engine-core socket directory relative to the engine project root +socket_dir="../engine-core/socket" [database] db_user="aura" @@ -112,7 +114,7 @@ daemongroup="engineuser" daemonuser="engineuser" [socket] -socketdir="/srv/src/liquidsoap" +socket_dir="/srv/src/liquidsoap" [audiosources] audio_source_folder="/var/audio/source" diff --git a/config/sample-production.engine.ini b/config/sample-production.engine.ini index 8f754aae2bed95a9109838dfc6dc51ef49e20b73..fd163e46757e67dc6411ca5c49c277f7f8f03a7f 100644 --- a/config/sample-production.engine.ini +++ b/config/sample-production.engine.ini @@ -1,8 +1,10 @@ +############################################## +# Engine Configuration # +############################################## -################### -# Engine Settings # -################### - +[general] +# Path to the engine-core socket directory relative to the engine project root +socket_dir="../engine-core/socket" [database] db_user="aura" @@ -111,9 +113,6 @@ lqs_delay_offset=0.5 daemongroup="engineuser" daemonuser="engineuser" -[socket] -socketdir="/opt/aura/engine/src/liquidsoap" - [audiosources] audio_source_folder="/var/audio/source" audio_source_extension=".flac" diff --git a/docs/developer-guide.md b/docs/developer-guide.md index 10a6b7e9e178e2843cd28b732f3a32417ad77f90..358415ba1f5404fc8b1e8fd8069f0566a060886d 100644 --- a/docs/developer-guide.md +++ b/docs/developer-guide.md @@ -62,7 +62,7 @@ When you start Engine the following is happening: 1. Python `run.py`: Initializes `src/core/engine.py` (The virtual mixer; class for remote-controlling Liquidsoap), Scheduler 2. Python `run.py`: Start Liquidsoap. -3. Liquidsoap: When Liquidsoap finished its startup, it creates a socket file as configured in `socketdir` of `engine.ini`. +3. Liquidsoap: When Liquidsoap finished its startup, it creates a socket file as configured in `socket_dir` of `engine.ini`. 4. Python `src/core/liquidsoap/client.py`: Connects to that socket file. 5. Python `src/schedulung/scheduler.py`: Continously loads timeslots from the API endpoints, stores them in the local database and starts the playout as per the timeslots. diff --git a/src/core/client/client.py b/src/core/client/client.py index ff723b8bd5eee6c34f2a0ccaecf608f47fe0ac0b..d8ef758e12fb995e47e3fc1915b1671147aecf52 100644 --- a/src/core/client/client.py +++ b/src/core/client/client.py @@ -49,7 +49,7 @@ class LiquidSoapClient: @param socket_path: Der Pfad zum Socket des Liquidsoap-Scripts """ self.logger = logging.getLogger("AuraEngine") - self.socket_path = config.get('socketdir') + '/' + socket_filename + self.socket_path = config.get("install_dir") + "/" + config.get("socket_dir") + "/" + socket_filename self.logger.debug("LiquidSoapClient using socketpath: " + self.socket_path) diff --git a/tests/test.py b/tests/test.py index 76a539b205b5f1bb355ce128b4948b3c0c0d7b9c..12abd65770bfb01ade025e4e71e1cf81dc22516b 100644 --- a/tests/test.py +++ b/tests/test.py @@ -68,8 +68,8 @@ class TestConfig(unittest.TestCase): engine_health_url = self.config.get("api_engine_store_health").replace("${ENGINE_NUMBER}", "1") self.assertTrue(validators.url(engine_health_url)) - # Check if Liquidsoap "socketdir" is set and a directory - self.assertTrue(os.path.isdir(self.config.get("socketdir"))) + # Check if Liquidsoap "socket_dir" is set and a directory + self.assertTrue(os.path.isdir(self.config.get("socket_dir"))) # Check if database settings are set self.assertIsNotNone(self.config.get("db_user"))