You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
And the last step - invoke it and see how it goes:
@@ -354,7 +369,7 @@ FDK is based on the asyncio event loop. Default event loop is not quite fast, bu
354
369
In order to make an FDK to process IO operation at least 4 times faster you need to add another dependency to your function:
355
370
356
371
```text
357
-
uvloop
372
+
uvloop
358
373
```
359
374
360
375
[UVLoop](https://github.com/MagicStack/uvloop) is a CPython wrapper on top of cross-platform [libuv](https://github.com/libuv/libuv).
@@ -372,8 +387,8 @@ A new FDK is here which means there suppose to be a way to upgrade your code fro
372
387
As you noticed - an entry point a function changed, i.e., func.py no longer considered as the main module (`__main__`) which means that the following section:
373
388
374
389
```python
375
-
if__name__=="__main__":
376
-
fdk.handle(handler)
390
+
if__name__=="__main__":
391
+
fdk.handle(handler)
377
392
```
378
393
379
394
has no effect any longer. Please note that FDK will fail-fast with an appropriate message if old-style FDK format used.
@@ -389,10 +404,10 @@ data = data.read()
389
404
If you've been using json lib to turn an incoming data into a dictionary you need to replace: `json.loads` with `json.load`
390
405
391
406
```python
392
-
try:
393
-
dct = json.load(data)
394
-
exceptValueErroras ex:
395
-
# do here whatever is reasonable
407
+
try:
408
+
dct = json.load(data)
409
+
exceptValueErroras ex:
410
+
# do here whatever is reasonable
396
411
```
397
412
398
413
### Dockerfile
@@ -404,13 +419,13 @@ If you've been using custom multi-stage Dockerfile (derived from what Fn CLI gen
404
419
the only thing that is necessary to change is an `ENTRYPOINT` from:
0 commit comments