We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
scheduler.resume_job
I have an interval job which prints number every 1 second. In the beginning the job is paused by default.
However, in the code scheduler.resume() works, but scheduler.resume_job(my_task_id) does not work. Here is the minimum reproduce repo: https://github.com/Hongbo-Miao/bug-flask-apscheduler
scheduler.resume()
scheduler.resume_job(my_task_id)
from flask import Flask from flask_apscheduler import APScheduler my_num = 0 def create_app() -> Flask: app = Flask(__name__) scheduler = APScheduler() scheduler.init_app(app) scheduler.start(paused=True) @scheduler.task( "interval", id="my_task_id", seconds=1, ) def increase_my_num(): global my_num print(f"my_num: {my_num}") my_num += 1 @app.route("/") def my_num(): global my_num # 1) This works # scheduler.resume() # 2) This doesn't work scheduler.resume_job("my_task_id") return {"my_num": my_num} return app
Please let me know if need anything else. Thanks! 😃
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I have an interval job which prints number every 1 second.
In the beginning the job is paused by default.
However, in the code
scheduler.resume()
works, butscheduler.resume_job(my_task_id)
does not work.Here is the minimum reproduce repo: https://github.com/Hongbo-Miao/bug-flask-apscheduler
Please let me know if need anything else. Thanks! 😃
The text was updated successfully, but these errors were encountered: