Skip to content

Commit

Permalink
📃 docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mic1on committed Nov 25, 2023
1 parent c49e51f commit bb86ac1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

<div align=center><img src="https://onestep.code05.com/logo-3.svg" width="300"></div>
<div align=center>
<a href="https://github.com/mic1on/onestep/actions/workflows/test.yml?query=event%3Apush+branch%3Amain" target="_blank">
Expand Down Expand Up @@ -28,6 +27,8 @@
## example

```python
# example.py

from onestep import step, WebHookBroker


Expand All @@ -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
Expand Down

0 comments on commit bb86ac1

Please sign in to comment.