-
Notifications
You must be signed in to change notification settings - Fork 8
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
Showing
34 changed files
with
113 additions
and
526 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,3 +0,0 @@ | ||
from .client import inngest_client | ||
|
||
__all__ = ["inngest_client"] | ||
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,14 @@ | ||
import inngest | ||
|
||
from .client import inngest_client | ||
|
||
|
||
@inngest_client.create_function( | ||
fn_id="hello-world", | ||
trigger=inngest.TriggerEvent(event="say-hello"), | ||
) | ||
def hello( | ||
ctx: inngest.Context, | ||
step: inngest.StepSync, | ||
) -> str: | ||
return "Hello world!" |
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,14 @@ | ||
import inngest | ||
|
||
from .inngest_client import inngest_client | ||
|
||
|
||
@inngest_client.create_function( | ||
fn_id="hello-world", | ||
trigger=inngest.TriggerEvent(event="say-hello"), | ||
) | ||
def hello( | ||
ctx: inngest.Context, | ||
step: inngest.StepSync, | ||
) -> str: | ||
return "Hello world!" |
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,14 +1,14 @@ | ||
import fastapi | ||
from src.inngest import inngest_client | ||
from src.inngest.client import inngest_client | ||
from src.inngest.functions import hello | ||
|
||
import inngest.fast_api | ||
from examples import functions | ||
|
||
app = fastapi.FastAPI() | ||
|
||
|
||
inngest.fast_api.serve( | ||
app, | ||
inngest_client, | ||
functions.create_async_functions(inngest_client), | ||
[hello], | ||
) |
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,3 +0,0 @@ | ||
from .client import inngest_client | ||
|
||
__all__ = ["inngest_client"] | ||
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import inngest | ||
|
||
from .client import inngest_client | ||
|
||
|
||
@inngest_client.create_function( | ||
fn_id="hello-world", | ||
trigger=inngest.TriggerEvent(event="say-hello"), | ||
) | ||
async def hello( | ||
ctx: inngest.Context, | ||
step: inngest.Step, | ||
) -> str: | ||
return "Hello world!" |
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,15 +1,13 @@ | ||
import flask | ||
from src.inngest import inngest_client | ||
from src.flask import app | ||
from src.inngest.client import inngest_client | ||
from src.inngest.functions import hello | ||
|
||
import inngest.flask | ||
from examples import functions | ||
|
||
app = flask.Flask(__name__) | ||
|
||
|
||
inngest.flask.serve( | ||
app, | ||
inngest_client, | ||
functions.create_sync_functions(inngest_client), | ||
[hello], | ||
) | ||
|
||
app.run(port=8000) |
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,3 @@ | ||
import flask | ||
|
||
app = flask.Flask("my-app") |
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,3 +0,0 @@ | ||
from .client import inngest_client | ||
|
||
__all__ = ["inngest_client"] | ||
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,9 +1,9 @@ | ||
import logging | ||
|
||
import inngest | ||
from src.flask import app | ||
|
||
logger = logging.getLogger(__name__) | ||
logger.addHandler(logging.StreamHandler()) | ||
logger = logging.getLogger(f"{app.logger.name}.inngest") | ||
logger.setLevel(logging.DEBUG) | ||
|
||
inngest_client = inngest.Inngest(app_id="flask_example", logger=logger) |
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,14 @@ | ||
import inngest | ||
|
||
from .client import inngest_client | ||
|
||
|
||
@inngest_client.create_function( | ||
fn_id="hello-world", | ||
trigger=inngest.TriggerEvent(event="say-hello"), | ||
) | ||
def hello( | ||
ctx: inngest.Context, | ||
step: inngest.StepSync, | ||
) -> str: | ||
return "Hello world!" |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.