muety / wakapi

📊 A minimalist, self-hosted WakaTime-compatible backend for coding statistics
https://wakapi.dev
MIT License
2.75k stars 173 forks source link

Configurable heartbeat offset / AFK timeout #156

Closed muety closed 3 months ago

muety commented 3 years ago

Current default is two minutes, however, this might be made configurable on a per-user basis. However, already generated summaries wouldn't be affected in retrospect. One would have to regenerate all their summaries.

Originally requested by @Lucas-M-G in https://github.com/muety/wakapi/issues/82#issuecomment-811866918

jsbrain commented 1 year ago

Push! This would be a great feature :)

szczepaan commented 1 year ago

Hi, it's been a while :) any news when the 'keystroke timeout' param will be configurable per user ?

muety commented 1 year ago

After a lot of users have expressed their interest in this, I'll increase prio from B to A. Still can't give an estimate for when I'll get to this, sorry!

szczepaan commented 1 year ago

@muety how can I change the default value globally for all users globally?

muety commented 1 year ago

You can't, currently.

alanhamlett commented 1 year ago

Here's the code we use at WakaTime to combine Heartbeats into Durations based on Keystroke Timeout:

https://gist.github.com/alanhamlett/0d0c496fe40d977dbdbf0abf0b34ec57

ariaieboy commented 11 months ago

I imported my data from Wakatime to my instance of Wakapi and the total time reported on Wakapi is 300 hours less than the total hours that Wakatime reports.
I think the reason behind it is that the AFK timeout between these 2 are different. the default keystroke timeout in wakatime is 15min but according to this issue the default value for wakapi is 2 min

muety commented 11 months ago

I think the reason behind it is that the AFK timeout between these 2 are different.

Yes, correct.