Open
Conversation
460f813 to
84be43d
Compare
499fe62 to
a454487
Compare
Contributor
|
Kindly include how to test the PR on the comment |
cb17143 to
44acb26
Compare
mnswaleh
approved these changes
Jul 10, 2019
Contributor
mnswaleh
left a comment
There was a problem hiding this comment.
Nice implementation. The notifications are being created
1b2da8b to
d67684b
Compare
0bcf20d to
7f05d61
Compare
763aff5 to
b7b5fad
Compare
4e6154b to
e1c0d89
Compare
Contributor
Author
Done |
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]
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.