Skip to content

Commit

Permalink
better docs for bus
Browse files Browse the repository at this point in the history
  • Loading branch information
joamag committed Oct 3, 2018
1 parent 2a9b139 commit b8b1464
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion doc/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,10 @@ to store the preferences (using shelve)

#### Bus

* `BUS` (`str`) - Defines the bus manager to be used (eg: `memory`, `redis`)
* `BUS` (`str`) - Defines the bus manager to be used, the bus manager should allow the creation of
a federated environment and its orchestration using an event driven approach (eg: `memory`, `redis`)
* `BUS_NAME` (`str`) - Global name used to create different diffusion scopes for different bus contexts (default: `global`)
* `BUS_SCOPE` (`str`) - Same as `BUS_NAME`

#### Session

Expand Down
1 change: 1 addition & 0 deletions src/appier/bus.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ def trigger(self, name, *args, **kwargs):
def _load(self, *args, **kwargs):
Bus._load(self, *args, **kwargs)
self._name = config.conf("BUS_NAME", "global")
self._name = config.conf("BUS_SCOPE", self._name)
self._name = kwargs.pop("name", self._name)
self._serializer = kwargs.pop("serializer", self.__class__.SERIALIZER)
self._global_channel = kwargs.pop("global_channel", self.__class__.GLOBAL_CHANNEL)
Expand Down

0 comments on commit b8b1464

Please sign in to comment.