CON-72 notify when device is offline#447
Open
Arusey wants to merge 1 commit into
Open
Conversation
Arusey
force-pushed
the
story/CON-72-notify-when-device-is-offline
branch
11 times, most recently
from
July 1, 2019 15:42
460f813 to
84be43d
Compare
Arusey
force-pushed
the
story/CON-72-notify-when-device-is-offline
branch
5 times, most recently
from
July 3, 2019 09:26
499fe62 to
a454487
Compare
Arusey
requested review from
codinger41,
joshuaocero,
koitoror,
mnswaleh and
vic3king
July 3, 2019 13:40
Contributor
|
Kindly include how to test the PR on the comment |
Arusey
force-pushed
the
story/CON-72-notify-when-device-is-offline
branch
3 times, most recently
from
July 9, 2019 13:28
cb17143 to
44acb26
Compare
mnswaleh
approved these changes
Jul 10, 2019
mnswaleh
left a comment
Contributor
There was a problem hiding this comment.
Nice implementation. The notifications are being created
Arusey
force-pushed
the
story/CON-72-notify-when-device-is-offline
branch
2 times, most recently
from
July 10, 2019 09:51
1b2da8b to
d67684b
Compare
Arusey
force-pushed
the
story/CON-72-notify-when-device-is-offline
branch
4 times, most recently
from
July 10, 2019 11:56
0bcf20d to
7f05d61
Compare
Arusey
force-pushed
the
story/CON-72-notify-when-device-is-offline
branch
9 times, most recently
from
July 16, 2019 08:30
763aff5 to
b7b5fad
Compare
Arusey
force-pushed
the
story/CON-72-notify-when-device-is-offline
branch
2 times, most recently
from
July 16, 2019 12:23
4e6154b to
e1c0d89
Compare
Contributor
Author
Done |
Arusey
force-pushed
the
story/CON-72-notify-when-device-is-offline
branch
2 times, most recently
from
July 18, 2019 10:02
218fa32 to
fedf9ec
Compare
- create device is offline notification - periodically check the device last seen - add too states for a device: online or offline [Finishes CON-72]
Arusey
force-pushed
the
story/CON-72-notify-when-device-is-offline
branch
from
July 18, 2019 11:22
fedf9ec to
8056793
Compare
IssaIan
approved these changes
Jul 19, 2019
vic3king
reviewed
Jul 25, 2019
| class AdminNotification(Base, Utility): | ||
| __tablename__ = 'admin_notifications' | ||
|
|
||
| id = Column(Integer, primary_key=True) # noqa |
Contributor
There was a problem hiding this comment.
I don't think we need # noqa here as this line of code is pep8 compliant.
vic3king
reviewed
Jul 25, 2019
| class Devices(Base, Utility): | ||
| __tablename__ = 'devices' | ||
| id = Column(Integer, Sequence('devices_id_seq', start=1, increment=1), primary_key=True) # noqa | ||
| id = Column(Integer, Sequence('devices_id_seq', start=1, increment=1), primary_key=True) # noqa |
Contributor
There was a problem hiding this comment.
The change on this line is not needed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This Pull request allows an administrator for the converge web app to receive notifications whenever a device has not been seen in a while.
Type of Change
How can this be tested
checkout to the branch and run migrations using
make migrate message="migration message"Install dependencies using
pip install -r requirements.txtEnsure your database has a number of devices in which their activity is online - their last seen should also be greater than a day relative to the current time
Run the following command on a different terminal to startup your scheduler
celery worker -A cworker.celery --loglevel=infocelery -A cworker.celery beat -l infocreate an index.html on your browser using the script attached below and inspect your console.