diff --git a/setup.py b/setup.py index eaf343a..ac664ce 100644 --- a/setup.py +++ b/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' ], ) diff --git a/timer_demo/timer.py b/timer_demo/timer.py new file mode 100644 index 0000000..238705a --- /dev/null +++ b/timer_demo/timer.py @@ -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() \ No newline at end of file