Detailed problem:
We auto email monitoring option was enabled in app settings and the websocket is reconnected for some reason or app is restarted, the server will have already running cron agent job for monitoring. But in reconnection the cron scheduler is recalled with same cron id making websocket disconnect.
Fix:
- Add check before calling cron agent scheduler , whether it's already running or not with same id.
- Also when Toggles down the auto email monitoring option then the scheduler should be cancelled, which is not yet implemented.
Structure:
As the auto email monitoring, is made with keeping in mind that the app will be running in background for certain tasks. And the cron agent doesn't get cancelled when the app is closed. So when the app is closed cron agent works in background and notification are send in case of new mails. (+TTS future).
So, here's the structure
Detailed problem:
We auto email monitoring option was enabled in app settings and the websocket is reconnected for some reason or app is restarted, the server will have already running cron agent job for monitoring. But in reconnection the cron scheduler is recalled with same cron id making websocket disconnect.
Fix:
Structure:
As the auto email monitoring, is made with keeping in mind that the app will be running in background for certain tasks. And the cron agent doesn't get cancelled when the app is closed. So when the app is closed cron agent works in background and notification are send in case of new mails. (+TTS future).
So, here's the structure