An endpoind was created in Central API that allow to change isOnline status and DateTime of change of a location (Edge/Cloud) which will be used by Heartbeat.
Alongside a worker job was created using quartz to check every minute if each locations was uptaded with "isOnline status = true" in less then 3 minutes otherwise it changes "isOnline status = false";
Fixes # allow to change isOnline status of location(edge/cloud); monitor online status of locations(edge/cloud)
Type of change
[x] New feature (non-breaking change which adds functionality)
[x] This change requires a documentation update
What has been changed?
Feature: Heartbeat can change isOnline status of Locations(edge/cloud)
How Has This Been Tested?
The test checked if for givven correct id and location, would change isOnline status of location, alongside with wrong inputs. Futhe more, it checked if worker job would change isOnline status to false of locations which was online and not updated for more then three minutes.
[x] Test A: the correct id and location was given, to check isOnline status; the result was as expected; it returned correct isOnline value for every requests.
[x] Test B: the id and location was given wrong in any mix and macth cases; the output was "not found" or "bad request"
[x] Test C: the worker job was checked if would change status of locations which was online and not updated for more then three minutes; the output was successful, the locations with "isOnline=true" which isOnline status was updated less then three minutes was unchanged, and for rest of them isOnline status was changed to false;
Checklist:
[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my code
[ ] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[x] My changes generate no new warnings
[ ] I have added tests that prove my fix is effective or that my feature works
[ ] New and existing unit tests pass locally with my changes
Description
An endpoind was created in Central API that allow to change isOnline status and DateTime of change of a location (Edge/Cloud) which will be used by Heartbeat. Alongside a worker job was created using quartz to check every minute if each locations was uptaded with "isOnline status = true" in less then 3 minutes otherwise it changes "isOnline status = false";
Fixes # allow to change isOnline status of location(edge/cloud); monitor online status of locations(edge/cloud)
Type of change
What has been changed?
How Has This Been Tested?
The test checked if for givven correct id and location, would change isOnline status of location, alongside with wrong inputs. Futhe more, it checked if worker job would change isOnline status to false of locations which was online and not updated for more then three minutes.
Checklist: