engine issueshttps://gitlab.servus.at/aura/engine/-/issues2024-03-26T16:18:46+01:00https://gitlab.servus.at/aura/engine/-/issues/138No playout after engine reboot if timeslot has already started2024-03-26T16:18:46+01:00Chris PastlNo playout after engine reboot if timeslot has already startedTried to start the playout by manually creating a timeslot in the DB and adjusting its start/stop time.
**Works as expected if timslot_start is in the future.**
If current time is between `timeslot_start` and `timeslot_end` - which wil...Tried to start the playout by manually creating a timeslot in the DB and adjusting its start/stop time.
**Works as expected if timslot_start is in the future.**
If current time is between `timeslot_start` and `timeslot_end` - which will be probably true after (re)starting the engine - no scheduled playout will start until the next timeslot.
![Bildschirmfoto_2023-09-19_um_17.53.41](/uploads/f43b590bf409c14821dbf0f567c99972/Bildschirmfoto_2023-09-19_um_17.53.41.png)
```bash
2023-09-19 17:53:50,270:engine:INFO - Finished loading local programme (0 timeslots) - [programme.py:94-refresh()]
2023-09-19 17:53:50,271:engine:INFO - Finished queuing programme. - [scheduler.py:285-queue_programme()]
```1.0-alpha4 — Raving Raccoon 🤪🦝David TrattnigDavid Trattnighttps://gitlab.servus.at/aura/engine/-/issues/100[EPIC] Schedule programme data model without ORM/DB2024-03-26T14:44:33+01:00David Trattnig[EPIC] Schedule programme data model without ORM/DBThe recent programme data is continuously fetched from the Steering API. To avoid any disruption in play-out (e.g. in cases where the API is not available due to network outages) the programme is also cached locally.
Engine uses a SQLAl...The recent programme data is continuously fetched from the Steering API. To avoid any disruption in play-out (e.g. in cases where the API is not available due to network outages) the programme is also cached locally.
Engine uses a SQLAlchemy model rebuilding an internal representation of the programme and relevant schedules for play-out.
Having an ORM and relatively heavy PostgreSQL server just for this single purpose is some unnecessary overhead. Therefore lean ways of caching should be evaluated. This POC aims to:
1. Cache the raw JSON endpoint data
2. Rebuild the ORM using simple POPOs
3. Use hashing strategies to easily detect updates, where applicable
## Sub Tasks
- [x] #124+
- [x] #129+
- [x] https://gitlab.servus.at/aura/engine/-/issues/133+
- [x] Refactor API Fetcher
- [x] POC for `TimetableService` as a lightweight replacement for `ProgrammeService`
- [x] Diffing between current and planned schedule using JSON file cache
- [x] Refactor timetable renderer for work with new domain model
- [x] Test and integrate timetable and scheduler with new domain model
- [x] Refactor `scheduling` module to improve testability
- [x] Check if uses of `ProgrammeService.engine.engine_time()` can be relocated, to reduce dependencies
- [x] Remove all references of SQLAlchemy and PostgreSQL
- [x] Add some more test cases
- [x] Documentation: Update README.md
- [x] Update docs.aura.radio + Docker Compose settings
## Merge Requests
- https://gitlab.servus.at/aura/engine/-/merge_requests/35+
- https://gitlab.servus.at/aura/aura/-/merge_requests/40+1.0-alpha4 — Raving Raccoon 🤪🦝David TrattnigDavid Trattnighttps://gitlab.servus.at/aura/engine/-/issues/136Error while scheduling stream, logs crowded with redundant "Wait a Little Bit...2024-03-23T18:05:17+01:00Ole Binderole@freirad.atError while scheduling stream, logs crowded with redundant "Wait a Little Bit Until Preloading Is Done..." messagesWhen scheduling a stream (`http://stream.fro.at:8008/fro-128.ogg`), I get an error:
```shell
engine | 2024-02-22 12:42:44,816:engine:INFO - === preload('PlaylistEntry #5 [12:43:00 - 12:45:00 | 120.0sec | Source: ...m.fro...When scheduling a stream (`http://stream.fro.at:8008/fro-128.ogg`), I get an error:
```shell
engine | 2024-02-22 12:42:44,816:engine:INFO - === preload('PlaylistEntry #5 [12:43:00 - 12:45:00 | 120.0sec | Source: ...m.fro.at:8008/fro-128.ogg]') === - [scheduler.py:550-do_preload()]
engine | 2024-02-22 12:42:44,816:engine:INFO - Got free 'http' channel 'in_stream_0' - [mixer.py:150-get_free_channel()]
engine | 2024-02-22 12:42:44,816:engine:INFO - Assign channel [2 : in_stream_0] to entry - [engine.py:318-preload()]
engine | 2024-02-22 12:42:44,819:engine:INFO - in_stream_0.start result: Done! - [channels.py:529-start()]
engine | 2024-02-22 12:42:44,820:engine:INFO - in_stream_0.status result: polling - [channels.py:482-is_ready()]
engine | Exception in thread PRELOAD#10:do_preload:2024-02-22_12:42:45:
engine | Traceback (most recent call last):
engine | File "/usr/local/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
engine | self.run()
engine | File "/usr/local/lib/python3.10/threading.py", line 1378, in run
engine | self.function(*self.args, **self.kwargs)
engine | File "/srv/src/aura_engine/control.py", line 166, in wrapper_func
engine | self.func(
engine | File "/srv/src/aura_engine/scheduling/scheduler.py", line 551, in do_preload
engine | self.engine.player.preload(entries[0])
engine | File "/srv/src/aura_engine/engine.py", line 320, in preload
engine | is_ready = entry.channel.load(uri, metadata=metadata)
engine | File "/srv/src/aura_engine/core/channels.py", line 452, in load
engine | if retries >= max_retries:
engine | TypeError: '>=' not supported between instances of 'int' and 'NoneType'
```
As a result engine keeps logging this continously:
```shell
engine | 2024-02-22 12:57:54,734:engine:INFO - PLAY: Wait a little bit until preloading is done ... - [scheduler.py:573-do_play()]
engine | 2024-02-22 12:57:56,737:engine:INFO - PLAY: Wait a little bit until preloading is done ... - [scheduler.py:573-do_play()]
engine | 2024-02-22 12:57:58,737:engine:INFO - PLAY: Wait a little bit until preloading is done ... - [scheduler.py:573-do_play()]
engine | 2024-02-22 12:58:00,740:engine:INFO - PLAY: Wait a little bit until preloading is done ... - [scheduler.py:573-do_play()]
engine | 2024-02-22 12:58:02,741:engine:INFO - PLAY: Wait a little bit until preloading is done ... - [scheduler.py:573-do_play()]
```
---
_Original ticket description, which had the same cause:_
The log file of engine is experiencing an overflow of repetitive log entries containing the message `PLAY: Wait a little bit until preloading is done ...`. I left engine running over night and hat 73 000 entries of only this message. This excessive logging is making it challenging to identify other important log information. I would suggest to optimize the logging to maintain clarity in the log file.1.0-alpha4 — Raving Raccoon 🤪🦝Chris PastlChris Pastlhttps://gitlab.servus.at/aura/engine/-/issues/77Graceful restart by keeping currently playing entry, in case it matches the o...2024-03-21T18:37:39+01:00David TrattnigGraceful restart by keeping currently playing entry, in case it matches the one to be scheduledWhen _Engine_ is crashing/restarting it normally (re-) schedules the entry which is planned per current timeslot. In case _Engine Core_ didn't crash though, it successfully kept playing the planned timeslot-entry. In such case no new sch...When _Engine_ is crashing/restarting it normally (re-) schedules the entry which is planned per current timeslot. In case _Engine Core_ didn't crash though, it successfully kept playing the planned timeslot-entry. In such case no new scheduling should happen i.e. when the playing entry is the one due to be scheduled.
Without the improvement, there is some Dead Air for some time, until the item is re-scheduled.1.0-alpha7Chris PastlChris Pastlhttps://gitlab.servus.at/aura/engine/-/issues/82Test and fine-tune playout timings2024-03-21T18:37:15+01:00David TrattnigTest and fine-tune playout timings1.0-alpha6Chris PastlChris Pastlhttps://gitlab.servus.at/aura/engine/-/issues/142Improve test coverage of `aura_engine/plugins/monitor.py`2024-03-18T20:47:26+01:00David TrattnigImprove test coverage of `aura_engine/plugins/monitor.py`Parent: https://gitlab.servus.at/aura/engine/-/issues/125+
---
Based on the [orm-less-scheduling](https://gitlab.servus.at/aura/engine/-/tree/orm-less-scheduling?ref_type=heads) branch or after engine#100 is merged to `main`.Parent: https://gitlab.servus.at/aura/engine/-/issues/125+
---
Based on the [orm-less-scheduling](https://gitlab.servus.at/aura/engine/-/tree/orm-less-scheduling?ref_type=heads) branch or after engine#100 is merged to `main`.1.0-alpha5Chris PastlChris Pastlhttps://gitlab.servus.at/aura/engine/-/issues/137Test cases for "src/aura_engine/core"2024-03-14T22:37:17+01:00David TrattnigTest cases for "src/aura_engine/core"Parent: #125+
---
Implement test cases with good code coverage.Parent: #125+
---
Implement test cases with good code coverage.1.0-alpha4 — Raving Raccoon 🤪🦝Chris PastlChris Pastlhttps://gitlab.servus.at/aura/engine/-/issues/143Improve test coverage of `aura_engine/base/config.py`2024-03-14T22:35:39+01:00David TrattnigImprove test coverage of `aura_engine/base/config.py`Parent: https://gitlab.servus.at/aura/engine/-/issues/125+
---
Based on the [orm-less-scheduling](https://gitlab.servus.at/aura/engine/-/tree/orm-less-scheduling?ref_type=heads) branch or after engine#100 is merged to `main`.Parent: https://gitlab.servus.at/aura/engine/-/issues/125+
---
Based on the [orm-less-scheduling](https://gitlab.servus.at/aura/engine/-/tree/orm-less-scheduling?ref_type=heads) branch or after engine#100 is merged to `main`.1.0-alpha4 — Raving Raccoon 🤪🦝Chris PastlChris Pastlhttps://gitlab.servus.at/aura/engine/-/issues/89Support for SQLite2024-03-06T18:46:45+01:00David TrattnigSupport for SQLiteBlockers:
- ~~#93+~~
- #98+Blockers:
- ~~#93+~~
- #98+1.0-alpha4 — Raving Raccoon 🤪🦝David TrattnigDavid Trattnighttps://gitlab.servus.at/aura/engine/-/issues/125[EPIC] Basic test suite for Engine2024-02-28T22:07:54+01:00David Trattnig[EPIC] Basic test suite for EngineParent: aura#175+
---
Test suite to cover the most important cases.
**Please note:** The `clock.py` test cases can be skipped for now, since we will [remove this code altogether](https://gitlab.servus.at/aura/aura/-/issues/312).
### S...Parent: aura#175+
---
Test suite to cover the most important cases.
**Please note:** The `clock.py` test cases can be skipped for now, since we will [remove this code altogether](https://gitlab.servus.at/aura/aura/-/issues/312).
### Sub Tasks
- https://gitlab.servus.at/aura/engine/-/issues/144+
- https://gitlab.servus.at/aura/engine/-/issues/143+
- https://gitlab.servus.at/aura/engine/-/issues/142+
- https://gitlab.servus.at/aura/engine/-/issues/137+
- Other test cases which look meaningful and improve the overall test coverage1.0-alpha5Chris PastlChris Pastlhttps://gitlab.servus.at/aura/engine/-/issues/144Improve test coverage of `aura_engine/base/lang.py`2024-02-28T16:56:33+01:00David TrattnigImprove test coverage of `aura_engine/base/lang.py`Parent: https://gitlab.servus.at/aura/engine/-/issues/125+
---
Based on the [orm-less-scheduling](https://gitlab.servus.at/aura/engine/-/tree/orm-less-scheduling?ref_type=heads) branch or after engine#100 is merged to `main`.Parent: https://gitlab.servus.at/aura/engine/-/issues/125+
---
Based on the [orm-less-scheduling](https://gitlab.servus.at/aura/engine/-/tree/orm-less-scheduling?ref_type=heads) branch or after engine#100 is merged to `main`.1.0-alpha5Chris PastlChris Pastlhttps://gitlab.servus.at/aura/engine/-/issues/128Add test coverage and display badge2024-02-23T18:52:12+01:00David TrattnigAdd test coverage and display badge1.0-alpha2 — ⚖️🐦 Precise PheasantDavid TrattnigDavid Trattnighttps://gitlab.servus.at/aura/engine/-/issues/141Line-in selection throws error2024-02-21T10:21:56+01:00Chris PastlLine-in selection throws errorError when selecting a line-in source in dashboard:
```
engine | 2024-02-20T21:40:39.483662146Z self.engine.player.preload(entries[0])
engine | 2024-02-20T21:40:39.483667862Z File "/srv/src/aura_engine/engine.py", line 300, in pr...Error when selecting a line-in source in dashboard:
```
engine | 2024-02-20T21:40:39.483662146Z self.engine.player.preload(entries[0])
engine | 2024-02-20T21:40:39.483667862Z File "/srv/src/aura_engine/engine.py", line 300, in preload
engine | 2024-02-20T21:40:39.483760076Z channel_name = self.resource_map.live_channel_for_resource(entry.source)
engine | 2024-02-20T21:40:39.483765598Z TypeError: ResourceMapping.live_channel_for_resource() takes 1 positional argument but 2 were given
```1.0-alpha3 — Playful Platypus ▶️🦦Chris PastlChris Pastlhttps://gitlab.servus.at/aura/engine/-/issues/122CI: Sometimes "TestSynchronized" test cases fail in the CI Job2024-02-16T16:33:37+01:00David TrattnigCI: Sometimes "TestSynchronized" test cases fail in the CI JobWhen repeating the job they usually succeed.
Example where it failed on 1st try: https://gitlab.servus.at/aura/engine/-/jobs/6945
Un-comment test case `test_synchronized`.When repeating the job they usually succeed.
Example where it failed on 1st try: https://gitlab.servus.at/aura/engine/-/jobs/6945
Un-comment test case `test_synchronized`.1.0-alpha3 — Playful Platypus ▶️🦦Chris PastlChris Pastlhttps://gitlab.servus.at/aura/engine/-/issues/64Denoise continuous Liquidsoap logging due to heartbeat status requests2024-02-07T12:24:11+01:00David TrattnigDenoise continuous Liquidsoap logging due to heartbeat status requestsBecause of the ongoing heartbeat pulses the Liquidsoap log file gets filled up pretty quickly. It might be worth reviewing the connection handling (Related #65)
```
2020/12/16 11:47:28 [server:3] New client unix socket "".
2020/12/16 11...Because of the ongoing heartbeat pulses the Liquidsoap log file gets filled up pretty quickly. It might be worth reviewing the connection handling (Related #65)
```
2020/12/16 11:47:28 [server:3] New client unix socket "".
2020/12/16 11:47:28 [server:3] Client unix socket "" disconnected.
2020/12/16 11:47:29 [server:3] New client unix socket "".
2020/12/16 11:47:29 [server:3] Client unix socket "" disconnected.
2020/12/16 11:47:30 [server:3] New client unix socket "".
2020/12/16 11:47:30 [server:3] Client unix socket "" disconnected.
2020/12/16 11:47:31 [server:3] New client unix socket "".
2020/12/16 11:47:31 [server:3] Client unix socket "" disconnected.
2020/12/16 11:47:32 [server:3] New client unix socket "".
2020/12/16 11:47:32 [server:3] Client unix socket "" disconnected.
2020/12/16 11:47:33 [server:3] New client unix socket "".
2020/12/16 11:47:33 [server:3] Client unix socket "" disconnected.
2020/12/16 11:47:34 [server:3] New client unix socket "".
2020/12/16 11:47:34 [server:3] Client unix socket "" disconnected.
2020/12/16 11:47:35 [server:3] New client unix socket "".
2020/12/16 11:47:35 [server:3] Client unix socket "" disconnected.
```1.0-alpha1 — 🚢🦆 Dockland DucklingDavid TrattnigDavid Trattnighttps://gitlab.servus.at/aura/engine/-/issues/4Basic Engine Features2024-01-23T18:49:43+01:00David TrattnigBasic Engine FeaturesBroadcast programme is scheduled via Dashboard/Steering. Possibility to mix / switch between 3 different audio sources:
1. Play playlists from filesystem (audio files are provided via Tank)
2. Play external audio streams
3. Play live au...Broadcast programme is scheduled via Dashboard/Steering. Possibility to mix / switch between 3 different audio sources:
1. Play playlists from filesystem (audio files are provided via Tank)
2. Play external audio streams
3. Play live audio
Other:
- Playlists should be played without any delay, even when the individual items are extremely short e.g. Jingles, sound effects (compare Radio Freistadt)
- Include RDS information for UKW/terrestrial broadcasts (this is solved by a separate Ticket https://gitlab.servus.at/aura/engine/-/issues/22)
- Ability to broadcast to IceCast streaming server
- Configurable Audio quality
- Support 4 or more Stereo-In channels (e.g. Studio 1, Studio 2, BBC, Satellite, Tuner)
- Extensive logging
**Open Sub-Tasks:**
* [x] File System Scheduling and correct Playout, Transitioning, Engine Core refactoring
* [x] Fix sidecase with parallel playout.
* [x] Fix Volume issues when switching between Playlist Entries
* [x] Check if all cases for "end of schedule" and "end of entry" are working as expected.
* [x] Configurable Logger with Log Levels. Update Logs with adequate Log Level.
* [x] Test scheduling with Analog IN Entries, multiple Analog INs, correct scheduling and play-out in the mix
* [x] Test scheduling with Stream Entries, multiple Streams, correct scheduling and play-out in the mix
* [x] Stream output, Check settings for IceCast connectivity, Test and possible fixes
* [x] Test very short and very long filesystem entries and correct timings with those. Most likely this requires another major refactoring to allow pre-scheduling. Currently unsure how to get this done with Liquidsoap playlists. Possibly use of a LQS Server Function could help + another type of queue.1.0-alpha2 — ⚖️🐦 Precise PheasantDavid TrattnigDavid Trattnighttps://gitlab.servus.at/aura/engine/-/issues/5Studio Clock2024-01-23T18:49:38+01:00David TrattnigStudio ClockWeb Interface to show:
- Time
- Current track and show
- Next track of current show
- Next showWeb Interface to show:
- Time
- Current track and show
- Next track of current show
- Next show1.0-alpha2 — ⚖️🐦 Precise PheasantDavid TrattnigDavid Trattnighttps://gitlab.servus.at/aura/engine/-/issues/88Threads are not terminated after SIGINT2024-01-23T18:49:22+01:00Lars KruseThreads are not terminated after SIGINTIt is currently not possible to stop `./run.sh` by pressing `CTRL-C`.
The process signal `SIGINT` seems to trigger the `EngineRunner.exit_gracefully` method in `run.py`, but its `sys.exit(0)` call blocks due to running threads.
In orde...It is currently not possible to stop `./run.sh` by pressing `CTRL-C`.
The process signal `SIGINT` seems to trigger the `EngineRunner.exit_gracefully` method in `run.py`, but its `sys.exit(0)` call blocks due to running threads.
In order to exit cleanly, we need to signal *each* thread, that it should finish. Probably some of the running threads are currently not notified.
There are probably two approaches for solving this issue:
* A) use Python's async features instead of threads
* B) ensure, that *every* thread establishes a communication path with the main thread in order to receive notifications1.0-alpha2 — ⚖️🐦 Precise PheasantDavid TrattnigDavid Trattnighttps://gitlab.servus.at/aura/engine/-/issues/110Implement VERSION file handling for Engine2024-01-23T18:48:52+01:00David TrattnigImplement VERSION file handling for EngineBasic approach as described in meta#81Basic approach as described in meta#811.0-alpha2 — ⚖️🐦 Precise PheasantDavid TrattnigDavid Trattnighttps://gitlab.servus.at/aura/engine/-/issues/117[EPIC] Fill timeslot with default playlist when specific playlist doesn't con...2024-01-15T14:04:52+01:00David Trattnig[EPIC] Fill timeslot with default playlist when specific playlist doesn't consume the whole timeslot lengthWhen a specific playlist (e.g. 40min duration) is assigned to a timeslot (e.g. 60min duration), then the missing 20mins are filled with one of the specified, default playlists.
At the end of the specific playlist the default playlist is...When a specific playlist (e.g. 40min duration) is assigned to a timeslot (e.g. 60min duration), then the missing 20mins are filled with one of the specified, default playlists.
At the end of the specific playlist the default playlist is scheduled from the beginning.1.1