-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ee292a7
commit f64a671
Showing
8 changed files
with
460 additions
and
250 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
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
24 changes: 24 additions & 0 deletions
24
apps/examples/simple-example/src/simple_example/setup_something.py
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,24 @@ | ||
""" | ||
Simple Example: Setup Something | ||
-------------------------------------------------------------------- | ||
Setup run before initialize endpoints streams and services | ||
""" | ||
|
||
from pathlib import Path | ||
|
||
from hopeit.app.context import EventContext | ||
from hopeit.app.logger import app_extra_logger | ||
|
||
|
||
__steps__ = ["run_once"] | ||
|
||
|
||
logger, extra = app_extra_logger() | ||
|
||
|
||
async def run_once(payload: None, context: EventContext): | ||
""" | ||
Load objects that match the given wildcard | ||
""" | ||
logger.info(context, "Setup done") | ||
Path("/tmp/hopeit.initializead").touch() |
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
Oops, something went wrong.