Skip to content
New issue

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

Hello, may I ask why two identical tasks are generated? #3

Open
china-zhoujie opened this issue Nov 13, 2022 · 2 comments
Open

Hello, may I ask why two identical tasks are generated? #3

china-zhoujie opened this issue Nov 13, 2022 · 2 comments

Comments

@china-zhoujie
Copy link

Hello, may I ask why two identical tasks are generated?
2022-11-13 11:22:22,464 - uvicorn.error - INFO - Started reloader process [27370] using statreload
2022-11-13 11:22:24,330 - apscheduler.scheduler - INFO - Adding job tentatively -- it will be properly scheduled when the scheduler starts
2022-11-13 11:22:24,348 - apscheduler.scheduler - INFO - Adding job tentatively -- it will be properly scheduled when the scheduler starts
INFO: Started server process [27377]
2022-11-13 11:22:24,349 - uvicorn.error - INFO - Started server process [27377]
INFO: Waiting for application startup.
2022-11-13 11:22:24,350 - uvicorn.error - INFO - Waiting for application startup.
2022-11-13 11:22:24,419 - apscheduler.scheduler - INFO - Added job "cron_task_test" to job store "default"
2022-11-13 11:22:24,419 - apscheduler.scheduler - INFO - Added job "cron_task_test" to job store "default"
2022-11-13 11:22:24,419 - apscheduler.scheduler - INFO - Scheduler started

@eukiseioh
Copy link

I think is only duplicated info and didnt create the task.
You could check the jobs are running and see if really is running two identical task.

@eukiseioh
Copy link

here why:

Important

If you schedule jobs in a persistent job store during your application’s initialization, you MUST define an explicit ID for the job and use replace_existing=True or you will get a new copy of the job every time your application restarts!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants