Skip to content

Commit

Permalink
v0.13.0 - fix bug: can't set state by lyrebird.publish api (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaoye authored Aug 23, 2018
1 parent d969a0e commit 02f9271
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 10 deletions.
2 changes: 1 addition & 1 deletion lyrebird/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def publish(channel, event, *args, **kwargs):
:return:
"""
# context.application.event_bus.publish(channel, event)
application.server['event'].publish(channel, event)
application.server['event'].publish(channel, event, *args, **kwargs)


def add_background_task(name, func):
Expand Down
8 changes: 0 additions & 8 deletions lyrebird/background.py

This file was deleted.

2 changes: 1 addition & 1 deletion tests/test_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,6 @@ def test_state_getter(event_server):
lyrebird.application.server['event'] = event_server
test_state = lyrebird.state.get('Test')
assert test_state == None
event_server.publish('Test', 'TestMessage', state=True)
lyrebird.publish('Test', 'TestMessage', state=True)
test_state = lyrebird.state.get('Test')
assert test_state == 'TestMessage'

0 comments on commit 02f9271

Please sign in to comment.