Make callbackdemo slightly more impressive
This commit is contained in:
parent
128cc7b1f9
commit
0b3eb33d42
|
@ -12,9 +12,10 @@ def fetch_new(state):
|
||||||
'id': itemid,
|
'id': itemid,
|
||||||
'title': f"Callback demo",
|
'title': f"Callback demo",
|
||||||
'body': 'No callbacks',
|
'body': 'No callbacks',
|
||||||
'callback': { 'id': itemid }
|
'callback': { 'count': 0 }
|
||||||
}
|
}
|
||||||
return [item]
|
return [item]
|
||||||
|
|
||||||
def callback(state, 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"
|
||||||
|
|
Loading…
Reference in New Issue