-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor support for queue arguments, add test
- Loading branch information
1 parent
5231ded
commit 55e4e8e
Showing
3 changed files
with
151 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,21 @@ | ||
from typing import NamedTuple, Dict | ||
from typing import NamedTuple, Dict, Callable | ||
|
||
|
||
# Used by handlers.REGISTRY as keys | ||
QueueRegistration = NamedTuple( | ||
'QueueRegistration', | ||
[('routing_key', str), ('queue', str), ('exchange', str), ('queue_arguments', Dict[str, str])] | ||
QueueKey = NamedTuple( | ||
'QueueKey', | ||
[ | ||
('queue', str), | ||
('exchange', str), | ||
] | ||
) | ||
|
||
|
||
HandlerRegistration = NamedTuple( | ||
'HandlerRegistration', | ||
[ | ||
('routing_key', str), | ||
('queue_arguments', Dict[str, str]), | ||
('handler', Callable), | ||
] | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters