tzulitai commented on a change in pull request #179:
URL: https://github.com/apache/flink-statefun/pull/179#discussion_r531363954
##########
File path: statefun-examples/statefun-python-walkthrough-example/walkthrough.py
##########
@@ -111,12 +115,29 @@ def state2(context, message):
context.state('counter').pack(counter)
[email protected]("walkthrough/state_access_del")
[email protected](
+ typename="walkthrough/state_access_del",
+ states=[StateSpec("counter")])
def state3(context, message):
# state can be deleted easily by using the del keyword.
del context['counter']
[email protected](
+ typename="walkthrough/missing_state",
+ states=[
+ StateSpec("counter"),
+ StateSpec("missing-state-1"),
+ StateSpec("missing-state-2", expiration=Expiration(10000)),
+ StateSpec("missing-state-3", expiration=Expiration(2000,
expire_mode=Expiration.Mode.AFTER_WRITE))
Review comment:
Very good ideas! I didn't realize the `timedelta` existed, makes sense
to use that as well.
----------------------------------------------------------------
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:
[email protected]