daskott / kronus Goto Github PK
View Code? Open in Web Editor NEWSimple CLI tool for assessing aliveness of users. And executes preset actions based on the results.
License: Apache License 2.0
Simple CLI tool for assessing aliveness of users. And executes preset actions based on the results.
License: Apache License 2.0
extension_id
to probe_settings where extensions could be none, joke, bible verse etc.E.g. joke
- you get a joke with your probe, or custom-questions
- you get a custom puzzle, if solved correctly, that means you're okay, math
- get a random math problem each time to check if you're okay
Should help prevent replay attacks with token
User can add multiple notes. Each note has a trigger e.g. Send note to emergency contact after 1hour
/30days
of being unavailable
.
Use cases:
Investigation
POST /users
- return user_id
/info
on user creation400
for bad request(e.g db errors like duplicate data or failed constraints) instead of 500
GET /probes
- should work without status
filterGET /jobs
- should work without status
filterGET /users/{id}/probes
When a user probe status
is unavailable
/bad
, call webhook url defined by user.
Start with probeScheduler
TODO:
--test
mode should use in:memory
db for testScheduleProbes
:
ENQUEUE_FOLLOWUP_PROBES_HANDLER
probeScheduler
test, but a wokerPool
test ?touchbase
codetouchbase
documentation with server
documentationAlso add validation for cron_expression
kronus server --dev
After a probe
reaches max_retries
, it doesn't wait for an hour for a response before escalating a message to an emergency contact.
This is probably the culprit > https://github.com/Daskott/kronus/blob/main/server/helpers.go#L234-L257. Folder is not created, if it doesn't exist in dev
mode
A user can text the server
something like:
probe 15m
And a probe will sent to the user in 15m
, with 0
retries. Can be done through scheduled
jobs.
TODO:
user.probe_settings
should have max_retries
& wait_time_in_minutes
(i.e. time to wait for a reply after which the probe is retried or is marked as unavailable
)user.probe_settings
to set max_retries
& wait_time_in_minutes
- they should also be fields in probe
.scheduledAt
column
to jobs table.scheduled
queue
& set scheduledAt
(i.e. when the job should be run)worker
that only pulls jobs from the scheduled
queue
& move them to the enqueued
queue
if scheduledAt
<= time.Now()
["probe_max_retries"]
arg set to 0
. So after the user's dynamic probe triggers, if they don't reply, immediately mark as unavailable & contact emergency contact.Enhancement:
kronus/server/pbscheduler/pbscheduler.go
Lines 126 to 138 in 14355ab
Note:
Right now, email
& phone_number
column in contacts
model is set to unique. This shouldn't be the case.
user_id_phone_number
& user_id_email
Send link with probe, to get user location via browser & store location for each probe
Benefits:
Problems:
Constraints:
Y/N
response. Clicking on the link indicates you're okay & sends your location. However, we need to still be able to send Y/N
response, for cases where the user has no internet or doesn't want to send location info.Questions:
Y/N
option ? Or should clicking the link prove you're okay ?Todo:
Later:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.