webcompat / webcompat-metrics-server

Server in charge of delivering different data to the webcompat-metrics-client
Mozilla Public License 2.0
6 stars 5 forks source link

Fixes #80 - Add weekly count script for scheduler #81

Closed laghee closed 5 years ago

laghee commented 5 years ago

OK, first pass. I didn't include any passed arguments, but those could be included if we add more functions. I figure we'll set it to run daily at 12:30 am UTC, and it will grab the previous day's total issues reported (regardless of whether they're still open).

So python3 webcompat_metrics_script.py

returns (as of now):

Issues filed yesterday (as of 2019-01-30T23:59:59Z): 62

I'm thinking I should add another method to this that checks what day this is running, and handles the weekly aggregation from that. Thoughts?

karlcow commented 5 years ago

Ah yes… btw, that's not a weekly_count.py ;) that's a daily_count.py so maybe change the name of the script too hehe.

Another possibility is to query the weekly count and record it every day. aka (this is the number of issues created in the last 7 days)

This for example returns all issues created in between 01 and 07 of January.

etc. This could be equally drawn and show the tendencies. It's a different way of looking at a weekly count.

laghee commented 5 years ago

Ah yes… btw, that's not a weekly_count.py ;) that's a daily_count.py so maybe change the name of the script too hehe.

😁 Good point -- always title things after you finish them because you don't always know where you'll end up.

Another possibility is to query the weekly count and record it every day. aka (this is the number of issues created in the last 7 days)

This could be equally drawn and show the tendencies. It's a different way of looking at a weekly count.

True. Interesting.

laghee commented 5 years ago

@karlcow Changes made, thanks! ✏️