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

Socket dir relative to project root. #72

parent 89ac5aee
No related branches found
No related tags found
No related merge requests found
##############################################
# 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"
......
##############################################
# 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"
......
##############################################
# 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"
......
......@@ -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.
......
......@@ -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)
......
......@@ -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"))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment