Skip to content

Commit a23beba

Browse files
authored
Merge pull request #23 from OpenVoiceOS/dev
0.0.4
2 parents 6c15675 + 34f8574 commit a23beba

6 files changed

Lines changed: 76 additions & 21 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,4 @@ dist
1818

1919
# Created by unit tests
2020
.pytest_cache/
21+
/.gtm/

CHANGELOG.md

Lines changed: 53 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,74 @@
11
# Changelog
22

3-
## [0.0.3](https://github.com/OpenVoiceOS/ovos-messagebus/tree/0.0.3) (2023-05-24)
3+
## [V0.0.4a8](https://github.com/OpenVoiceOS/ovos-messagebus/tree/V0.0.4a8) (2023-12-30)
44

5-
[Full Changelog](https://github.com/OpenVoiceOS/ovos-messagebus/compare/V0.0.3a2...0.0.3)
5+
[Full Changelog](https://github.com/OpenVoiceOS/ovos-messagebus/compare/V0.0.4a7...V0.0.4a8)
6+
7+
**Fixed bugs:**
8+
9+
- fix/log\_spam [\#22](https://github.com/OpenVoiceOS/ovos-messagebus/pull/22) ([JarbasAl](https://github.com/JarbasAl))
10+
11+
## [V0.0.4a7](https://github.com/OpenVoiceOS/ovos-messagebus/tree/V0.0.4a7) (2023-12-29)
12+
13+
[Full Changelog](https://github.com/OpenVoiceOS/ovos-messagebus/compare/V0.0.4a6...V0.0.4a7)
614

715
**Merged pull requests:**
816

9-
- Replace docker container actions [\#10](https://github.com/OpenVoiceOS/ovos-messagebus/pull/10) ([NeonDaniel](https://github.com/NeonDaniel))
17+
- packaging/update\_imports [\#21](https://github.com/OpenVoiceOS/ovos-messagebus/pull/21) ([JarbasAl](https://github.com/JarbasAl))
18+
19+
## [V0.0.4a6](https://github.com/OpenVoiceOS/ovos-messagebus/tree/V0.0.4a6) (2023-12-29)
20+
21+
[Full Changelog](https://github.com/OpenVoiceOS/ovos-messagebus/compare/V0.0.4a5...V0.0.4a6)
1022

11-
## [V0.0.3a2](https://github.com/OpenVoiceOS/ovos-messagebus/tree/V0.0.3a2) (2023-05-24)
23+
**Closed issues:**
24+
25+
- This happens when I ctrl+c a skill launched by ovos-skill-launcher [\#14](https://github.com/OpenVoiceOS/ovos-messagebus/issues/14)
26+
27+
**Merged pull requests:**
1228

13-
[Full Changelog](https://github.com/OpenVoiceOS/ovos-messagebus/compare/V0.0.3a1...V0.0.3a2)
29+
- Update requirements.txt [\#20](https://github.com/OpenVoiceOS/ovos-messagebus/pull/20) ([JarbasAl](https://github.com/JarbasAl))
30+
31+
## [V0.0.4a5](https://github.com/OpenVoiceOS/ovos-messagebus/tree/V0.0.4a5) (2023-10-17)
32+
33+
[Full Changelog](https://github.com/OpenVoiceOS/ovos-messagebus/compare/V0.0.4a4...V0.0.4a5)
1434

1535
**Fixed bugs:**
1636

17-
- Killed if previous bus.pid exists [\#4](https://github.com/OpenVoiceOS/ovos-messagebus/issues/4)
37+
- log tweaks [\#19](https://github.com/OpenVoiceOS/ovos-messagebus/pull/19) ([JarbasAl](https://github.com/JarbasAl))
1838

19-
**Closed issues:**
39+
## [V0.0.4a4](https://github.com/OpenVoiceOS/ovos-messagebus/tree/V0.0.4a4) (2023-09-28)
2040

21-
- Error when running [\#7](https://github.com/OpenVoiceOS/ovos-messagebus/issues/7)
41+
[Full Changelog](https://github.com/OpenVoiceOS/ovos-messagebus/compare/V0.0.4a3...V0.0.4a4)
2242

2343
**Merged pull requests:**
2444

25-
- Update GitHub automation [\#9](https://github.com/OpenVoiceOS/ovos-messagebus/pull/9) ([NeonDaniel](https://github.com/NeonDaniel))
26-
- Update dependencies to stable versions [\#8](https://github.com/OpenVoiceOS/ovos-messagebus/pull/8) ([NeonDaniel](https://github.com/NeonDaniel))
45+
- \[requirements\] Add missing ovos-bus-client [\#18](https://github.com/OpenVoiceOS/ovos-messagebus/pull/18) ([goldyfruit](https://github.com/goldyfruit))
2746

28-
## [V0.0.3a1](https://github.com/OpenVoiceOS/ovos-messagebus/tree/V0.0.3a1) (2023-04-30)
47+
## [V0.0.4a3](https://github.com/OpenVoiceOS/ovos-messagebus/tree/V0.0.4a3) (2023-09-27)
2948

30-
[Full Changelog](https://github.com/OpenVoiceOS/ovos-messagebus/compare/V0.0.2...V0.0.3a1)
49+
[Full Changelog](https://github.com/OpenVoiceOS/ovos-messagebus/compare/V0.0.4a2...V0.0.4a3)
50+
51+
## [V0.0.4a2](https://github.com/OpenVoiceOS/ovos-messagebus/tree/V0.0.4a2) (2023-08-16)
52+
53+
[Full Changelog](https://github.com/OpenVoiceOS/ovos-messagebus/compare/V0.0.4a1...V0.0.4a2)
54+
55+
**Closed issues:**
56+
57+
- Consider making this configurable with a default value. maybe `Configuration["logs"]["excluded_messages"]`? [\#16](https://github.com/OpenVoiceOS/ovos-messagebus/issues/16)
58+
59+
## [V0.0.4a1](https://github.com/OpenVoiceOS/ovos-messagebus/tree/V0.0.4a1) (2023-06-23)
60+
61+
[Full Changelog](https://github.com/OpenVoiceOS/ovos-messagebus/compare/V0.0.3...V0.0.4a1)
62+
63+
**Fixed bugs:**
64+
65+
- AttributeError: 'MemoryTempfile' object has no attribute 'tempdir' [\#12](https://github.com/OpenVoiceOS/ovos-messagebus/issues/12)
66+
- Killed if previous bus.pid exists [\#4](https://github.com/OpenVoiceOS/ovos-messagebus/issues/4)
67+
68+
**Merged pull requests:**
69+
70+
- Remove PIDLock to fix \#4 [\#13](https://github.com/OpenVoiceOS/ovos-messagebus/pull/13) ([goldyfruit](https://github.com/goldyfruit))
71+
- Replace docker container actions [\#10](https://github.com/OpenVoiceOS/ovos-messagebus/pull/10) ([NeonDaniel](https://github.com/NeonDaniel))
3172

3273

3374

ovos_messagebus/__main__.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
from ovos_utils import create_daemon, wait_for_exit_signal
2323
from ovos_messagebus.load_config import load_message_bus_config
2424
from ovos_utils.log import LOG, init_service_logger
25-
from ovos_utils.process_utils import reset_sigint_handler, PIDLock
25+
from ovos_utils.process_utils import reset_sigint_handler
2626
from tornado import web, ioloop
2727

2828
from ovos_messagebus.event_handler import MessageBusEventHandler
@@ -41,10 +41,8 @@ def on_stopping():
4141

4242

4343
def main(ready_hook=on_ready, error_hook=on_error, stopping_hook=on_stopping):
44-
PIDLock.init()
4544
reset_sigint_handler()
4645
init_service_logger("bus")
47-
PIDLock("bus")
4846
LOG.info('Starting message bus service...')
4947
config = load_message_bus_config()
5048
routes = [(config.route, MessageBusEventHandler)]

ovos_messagebus/event_handler.py

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,12 @@
1717
import sys
1818
import traceback
1919

20-
from ovos_utils.messagebus import FakeMessage as Message
20+
from ovos_utils.fakebus import Message
2121
from ovos_utils.log import LOG
22+
from ovos_config import Configuration
2223
from pyee import EventEmitter
2324
from tornado.websocket import WebSocketHandler
25+
from ovos_bus_client.session import SessionManager
2426

2527
client_connections = []
2628

@@ -33,13 +35,24 @@ def __init__(self, application, request, **kwargs):
3335
def on(self, event_name, handler):
3436
self.emitter.on(event_name, handler)
3537

38+
@property
39+
def max_message_size(self) -> int:
40+
return Configuration().get("websocket", {}).get("max_msg_size", 10) * 1024 * 1024
41+
3642
def on_message(self, message):
37-
LOG.debug(message)
43+
3844
try:
3945
deserialized_message = Message.deserialize(message)
4046
except Exception:
4147
return
4248

49+
filter_ogs = ["gui.status.request", "gui.page.upload"]
50+
if deserialized_message.msg_type not in filter_ogs:
51+
LOG.debug(deserialized_message.msg_type +
52+
f' source: {deserialized_message.context.get("source", [])}' +
53+
f' destination: {deserialized_message.context.get("destination", [])}\n'
54+
f'SESSION: {SessionManager.get(deserialized_message).serialize()}')
55+
4356
try:
4457
self.emitter.emit(deserialized_message.msg_type,
4558
deserialized_message)
@@ -52,7 +65,8 @@ def on_message(self, message):
5265
client.write_message(message)
5366

5467
def open(self):
55-
self.write_message(Message("connected").serialize())
68+
self.write_message(Message("connected",
69+
context={"session": {"session_id": "default"}}).serialize())
5670
client_connections.append(self)
5771

5872
def on_close(self):

ovos_messagebus/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# START_VERSION_BLOCK
22
VERSION_MAJOR = 0
33
VERSION_MINOR = 0
4-
VERSION_BUILD = 3
4+
VERSION_BUILD = 4
55
VERSION_ALPHA = 0
66
# END_VERSION_BLOCK

requirements.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
tornado~=6.0, >=6.0.3
2-
ovos-utils~=0.0, >=0.0.32
3-
ovos-config~=0.0,>=0.0.8
2+
ovos-bus-client~=0.0, >=0.0.7
3+
ovos-utils~=0.0, >=0.0.37
4+
ovos-config~=0.0,>=0.0.12

0 commit comments

Comments
 (0)