bedead / bedead/Eibox

Web socket re-connection error on auto email monitoring turned on

Open
#20 0 comments 0 reactions 0 assignees View on GitHub
api bug medium
Dominant language
Python
Stars
1
Forks
0
PR merge metrics
No merged PRs in 30d

Description

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
- [x] - Remove scheduling of cron agent from chat websocket connection.
- [ ] - In app whenever user logins based on data send from server (previous or default preference of user) call the start cron scheduler api endpoint. (Also add logic to check if existing job is running for same id)
- [ ] - When user turns it off manually from settings call end cron scheduler api endpoint.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing the login flow, the auto email monitoring preference, and the cron scheduler API endpoints mentioned in the issue. Verify that reconnecting or restarting does not create a duplicate job for the same cron ID, and that disabling the setting cancels the existing scheduler.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.