|
8 | 8 | app = func.FunctionApp(http_auth_level=func.AuthLevel.ANONYMOUS)
|
9 | 9 |
|
10 | 10 |
|
11 |
| -@app.function_name(name="put_bc_trigger") |
12 |
| -@app.blob_output(arg_name="file", |
13 |
| - path="python-worker-tests/test-blobclient-trigger.txt", |
14 |
| - connection="AzureWebJobsStorage") |
15 |
| -@app.route(route="put_bc_trigger") |
16 |
| -def put_bc_trigger(req: func.HttpRequest, file: func.Out[str]) -> str: |
17 |
| - file.set(req.get_body()) |
18 |
| - return 'OK' |
| 11 | +# @app.function_name(name="put_bc_trigger") |
| 12 | +# @app.blob_output(arg_name="file", |
| 13 | +# path="python-worker-tests/test-blobclient-trigger.txt", |
| 14 | +# connection="AzureWebJobsStorage") |
| 15 | +# @app.route(route="put_bc_trigger") |
| 16 | +# def put_bc_trigger(req: func.HttpRequest, file: func.Out[str]) -> str: |
| 17 | +# file.set(req.get_body()) |
| 18 | +# return 'OK' |
19 | 19 |
|
20 | 20 | # An HttpTrigger to generating EventHub event from EventHub Output Binding
|
21 |
| -# @app.function_name(name="eventhub_output") |
22 |
| -# @app.route(route="eventhub_output") |
23 |
| -# @app.event_hub_output(arg_name="event", |
24 |
| -# event_hub_name="python-worker-ci-eventhub-one", |
25 |
| -# connection="AzureWebJobsEventHubConnectionString") |
26 |
| -# def eventhub_output(req: func.HttpRequest, event: func.Out[str]) -> str: |
27 |
| -# event.set(req.get_body().decode('utf-8')) |
28 |
| -# return 'OK' |
| 21 | +@app.function_name(name="eventhub_output") |
| 22 | +@app.event_hub_output(arg_name="event", |
| 23 | + event_hub_name="python-worker-ci-eventhub-one", |
| 24 | + connection="AzureWebJobsEventHubConnectionString") |
| 25 | +@app.route(route="eventhub_output") |
| 26 | +def eventhub_output(req: func.HttpRequest, event: func.Out[str]) -> str: |
| 27 | + # event.set(req.get_body().decode('utf-8')) |
| 28 | + return 'OK' |
29 | 29 |
|
30 | 30 | # # This is an actual EventHub trigger which will convert the event data
|
31 | 31 | # # into a storage blob.
|
|
0 commit comments