-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #40 from melvinkcx/features/null_handler
add nullhandler
- Loading branch information
Showing
1 changed file
with
17 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
from typing import Iterable | ||
|
||
from fastapi_events.handlers.base import BaseEventHandler | ||
from fastapi_events.typing import Event | ||
|
||
|
||
class NullHandler(BaseEventHandler): | ||
""" | ||
NullHandler | ||
a handler that does nothing. | ||
can be used as a stub when a handler is expected. | ||
""" | ||
async def handle(self, event: Event) -> None: | ||
... | ||
|
||
async def handle_many(self, events: Iterable[Event]) -> None: | ||
... |