From bb86ac17033127a4c422911572abb9d3229ad1de Mon Sep 17 00:00:00 2001 From: miclon Date: Sat, 25 Nov 2023 21:51:11 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=83=20docs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8fb9530..26aa774 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,3 @@ -
@@ -28,6 +27,8 @@ ## example ```python +# example.py + from onestep import step, WebHookBroker @@ -46,7 +47,7 @@ from onestep import step, CronBroker # 每3秒触发一次任务 -@step(from_broker=CronBroker("* * * * * */3", a=1)) +@step(from_broker=CronBroker("* * * * * */3", body={"a": 1})) def cron_task(message): assert message.body == {"a": 1} return message