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

Fix/email notification #143

Merged
merged 5 commits into from
May 5, 2020
Merged

Fix/email notification #143

merged 5 commits into from
May 5, 2020

Conversation

nmlinaric
Copy link
Member

@nmlinaric nmlinaric commented Apr 16, 2020

The general idea is to assume that all nodes are not working, except if they reported as working in the last 16 minutes.
Also I suggest to change on daemon app interval for sending uptime to 15 min, like it is for balance and block.
Then if no record is inserted into the DB in the last 15 min, then the new SQL query is triggered because of the 16 min mark, isWorking: false is inserted into the DB and at the cronjob time mark a notification mail is going to be sent.

@nmlinaric nmlinaric requested a review from morrigan April 16, 2020 07:57
@nmlinaric nmlinaric marked this pull request as ready for review April 21, 2020 13:05
@morrigan
Copy link
Member

morrigan commented May 4, 2020

@nmlinaric the problem I've seen when testing is that node in frontend was still offline because there was no new uptime record where it says offline. So, I've handled that and to be able to do that I've added a separate property.

Ideally, this should be refactored to handle cronjob separately from received offline uptime (processNodeUptime function) and by having multiple smaller functions.

@morrigan morrigan merged commit 3ee78c1 into master May 5, 2020
@morrigan morrigan deleted the fix/email-notification branch May 5, 2020 08:19
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

Successfully merging this pull request may close these issues.

None yet

2 participants