I am unable to get the job list before I start blockingscheduler, I already have a job with id as
background_event_publisher
Now when I try to add -
jobstores = {
'default': SQLAlchemyJobStore(url=os.environ.get("SQLALCHEMY_DATABASE_URI", None))
}
scheduler = BlockingScheduler(
daemon=True, jobstores=jobstores, timezone=pytz.utc)
scheduler.get_jobs()
Gives
[]
Then
scheduler.add_job(fun, 'cron', hour='09', minute='30',
id='background_event_publisher' , misfire_grace_time=3600)
scheduler.start()
Gives Error
apscheduler.jobstores.base.ConflictingIdError: 'Job identifier (background_event_publisher) conflicts with an existing job
Can't understand why are not getting anything in get_jobs() while it still exists.
question from:
https://stackoverflow.com/questions/66061653/blocking-schedulerapscheduler-cannot-get-the-job-list-before-starting 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…