ActivityWatch / activitywatch-old

[DEPRECATED] :watch: Logs your computer activities, a RescueTime replacement.
MIT License
16 stars 2 forks source link

Handle signals and exit gracefully #4

Open ErikBjare opened 9 years ago

ErikBjare commented 9 years ago

This is a requirement for the first stable release.

This is a major issue in the current implementation as it currently just quits without sending off/saving events still in the pipeline, leading to data loss of recent events. It also adds significant complexities as the timing behavior for different agents is unknown. Some agents send events as they happen, others wait for them to complete. Some filter chains also wait for a certain time between handling events (to do chunking for instance).

The solution is intended to have good compatibility with systemd.

Questions

I've gathered some resources here that are useful when implementing.