You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2020/08/04 16:52:50 UTC

[GitHub] [flink-statefun] sjwiesman commented on a change in pull request #128: [hotfix] fix python sdk example

sjwiesman commented on a change in pull request #128:
URL: https://github.com/apache/flink-statefun/pull/128#discussion_r465191925



##########
File path: docs/sdk/python.md
##########
@@ -132,23 +132,23 @@ The delayed message is non-blocking so functions will continue to process record
 The delay is specified via a [Python timedelta](https://docs.python.org/3/library/datetime.html#datetime.timedelta).
 
 {% highlight python %}
-from google.protobuf.any_pb2 import Any
+from datetime import timedelta
 from statefun import StatefulFunctions
 
 functions = StatefulFunctions()
 
-@functions.bind("example/caller")
-def caller_function(context, message):
-    """A simple stateful function that sends a message to the user with id `user1`"""
+@functions.bind("example/delay")
+def delayed_function(context, message):
+    """A simple stateful function that sends a message to its caller with a delay"""
 
-    user = User()
-    user.user_id = "user1"
-    user.name = "Seth"
+    Response response = Response()

Review comment:
       This is what happens when I write Java all day and then try to quickly fix some python 




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org