增加定时器 demo code
This commit is contained in:
parent
c2743784cb
commit
38af7619c2
1
setup.py
1
setup.py
|
@ -50,5 +50,6 @@ setup(
|
|||
'request-id==1.0.1',
|
||||
'nameko-sentry==1.0.0',
|
||||
'pyopenssl==23.1.1',
|
||||
'rocketry==2.4.0'
|
||||
],
|
||||
)
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
from rocketry import Rocketry
|
||||
from rocketry.conds import daily
|
||||
|
||||
app = Rocketry()
|
||||
|
||||
|
||||
@app.task(daily)
|
||||
def do_daily():
|
||||
print('日常任务')
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
app.run()
|
Loading…
Reference in New Issue