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

Could it possible to add a new listener? #498

Open
BlackWatchuser opened this issue Mar 11, 2021 · 2 comments
Open

Could it possible to add a new listener? #498

BlackWatchuser opened this issue Mar 11, 2021 · 2 comments

Comments

@BlackWatchuser
Copy link

Usage:
I'm Using apscheduler with django-apscheduler's DjangoJobStore, got error "MySQL server has gone away" when the job's interval is very long.
here's package's version:

django-apscheduler==0.5.2
shellescape==3.8.1

I have read previous issues about my problem, and i came out an thought, could it possible to add a new listener named
"EVENT_JOBSTORE_GET_ERROR", which is used to notify user when "getting job from job store" stage raised an exception.
Then user add a listener to handle this error. In my case, i would recreate an conncetion to mysql and retry.

please, tell me it this gonna work?

@agronholm
Copy link
Owner

The current game plan for APScheduler 4.0 is to encapsulate reconnection logic in the data store itself, so the scheduler does not have to care. Only unrecoverable errors should fall through which would then crash the entire scheduler. That said, I'm not opposed to the idea of the data store sending events when it has trouble with the underlying service.

@BlackWatchuser
Copy link
Author

ok, thanks for reply, I'll try another way.

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

No branches or pull requests

2 participants