From 0b3eb33d42b3e9fc61037f0ff8d30c5933cf557b Mon Sep 17 00:00:00 2001 From: Tim Van Baak Date: Mon, 8 Jun 2020 22:42:39 -0700 Subject: [PATCH] Make callbackdemo slightly more impressive --- sources/callbackdemo.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sources/callbackdemo.py b/sources/callbackdemo.py index 4fa6927..fe8396c 100644 --- a/sources/callbackdemo.py +++ b/sources/callbackdemo.py @@ -12,9 +12,10 @@ def fetch_new(state): 'id': itemid, 'title': f"Callback demo", 'body': 'No callbacks', - 'callback': { 'id': itemid } + 'callback': { 'count': 0 } } return [item] def callback(state, item): - item['body'] = f"Last callback at {datetime.now()}" + item['callback']['count'] += 1 + item['body'] = f"Last callback at {datetime.now()}, {item['callback']['count']} total callbacks"