20 Commits

Author SHA1 Message Date
Jonas L.
63ff50b82c
feat: rename airtime-pypo exchange to playout (#3170)
### Description

The playout exchange was changed to `fanout` without migrating the
previous `direct` exchange. This cause issues during upgrades, such as:

```
amqp.exceptions.PreconditionFailed: Exchange.declare: (406) PRECONDITION_FAILED - inequivalent arg 'type' for exchange 'airtime-pypo' in vhost '/libretime': received 'fanout' but current is 'direct'
```

This is documented upstream in
https://www.rabbitmq.com/docs/queues#property-equivalence

This change provides an upgrade path by renaming the exchange, and leave
the old exchange behind. Loosing messages is not a concern for the
playout queue.

### Testing Notes

- Checkout version `4.4.0`
- Run `make dev`
- Checkout 9e55d3bb6f2fa0f9a4dc858359a99e9d50c826a4
- Run `make dev`
- See the exception in playout: `docker compose logs -f playout`
- Checkout this PR
- Run `make dev`
- See playout fine working.


### **Links**

https://github.com/libretime/libretime/pull/3161
2025-06-14 17:56:21 +02:00
dakriy
9e55d3bb6f
feat: use fanout queue type for playout queue (#3161)
### Description

Currently, only one service can listen to libretime schedule change
events. This change allows for as many services as desired to listen for
schedule change events.

**This is a new feature**:

Yes

**I have updated the documentation to reflect these changes**:

No, as this seems like the obvious default

### Testing Notes

**What I did:**

I created 2 playout blocks, connected them both to the fanout queue and
saw that they could all connect and receive schedule change events at
the same time.

**How you can replicate my testing:**

See testing notes
2025-06-07 05:05:04 +01:00
jo
74af2112a6 fix(playout): quote incompatible <py3.9 type hints 2023-03-22 09:11:56 +00:00
jo
719464a272 refactor(playout): add more typings 2023-03-04 17:06:16 +02:00
jo
b17ff4afad test(playout): silence existing broad-exception-caught errors 2023-03-04 17:06:16 +02:00
jo
a77321190f refactor(playout): fix linting errors 2023-03-04 17:06:16 +02:00
jo
f09d0ec3c6 refactor(playout): remove unused recorder 2023-03-04 17:06:16 +02:00
jo
5042704d42 feat(playout): don't serialize message twice 2023-03-04 17:06:16 +02:00
jo
e88e843b65 refactor(playout): add typings and fix linting errors
move EVENT_KEY_FORMAT to events module
properly type fetch queue
event start/end can be str or datetime
2023-02-26 20:05:12 +01:00
jo
861698987c refactor: don't use f-string on logging statements
The strings are now be formatted if the logging level is enabled.
2023-02-26 19:09:51 +02:00
jo
c6940db289 feat: replace loguru with logging 2023-02-26 19:09:51 +02:00
jo
4ada25a3ff fix(playout): add types
This reverts commit d6348d55752f946a4d3815773d7c7ef90310c00f.
2022-10-11 09:28:52 +02:00
jo
a79980e65f feat(playout): move message handling to main thread 2022-09-16 13:16:06 +02:00
jo
2fa045a8ef feat(playout): remove stream_setting update handler 2022-09-06 13:21:54 +02:00
jo
f5a83dbabb feat(playout): allow updating message_offline value 2022-09-06 13:21:54 +02:00
jo
d6348d5575 fix(playout): py36 compatibility broken typings
This partially reverts commit 5505222df632ff8f311d19056db0619501b083cf.
2022-09-01 19:17:33 +02:00
jo
5505222df6 refactor(playout): rename vars and add typing 2022-08-21 16:13:34 +02:00
Jonas L
a730c1b1a4
fix(playout): add thread names (#2056) 2022-08-14 19:55:39 +02:00
Jonas L
9413bd5a29
refactor(playout): improve exceptions handling (#2027) 2022-08-09 21:05:21 +02:00
Jonas L
7e2f2d60f0
chore(playout): restructure modules (#1971) 2022-07-18 15:11:47 +02:00