-
Notifications
You must be signed in to change notification settings - Fork 2
Description
Currently kinro notices when you've worked enough in the current month. It counts all the days in a given month, sums their work_ends - work_starts deltas and compares to the sum of TimeSpans of this month, taking overlaps into account.
This is fine for finding out the key metric - have I worked enough for the current moment in time. But we can do more. I'd like to be able to define a long running task, like 'Learn Portuguese', and set a daily goal for it, let's say thirty minutes a day. I want to be able to define multiple such goals. Ideally, I would be able to easily set such goals from a previous day.
Later on, as a bonus, this new function can also become a partial alert, so having XX% of the task could trigger an event. So that I can start rushing when some bucket burned through most of allocated time (and I'm still not on the right track).
The proposed solution is to:
- Get rid of
Clientand makeBuckets a tree structure using M2M relations. - Remove
Day.work_startsandDay.work_endsand define a new modelAlert- this makes theDaymodel conceptually obsolete,workedisn't used. - Tree structure makes calculating Bucket deltas more difficult and time consuming, consider some form of cache (stored on Bucket)