Wikipedia:Bots/Requests for approval/StatusBot
- The following discussion is an archived debate. Please do not modify it. Subsequent comments should be made in a new section. The result of the discussion was
Approved.
Operator: TheFearow
Automatic or Manually Assisted: Automatic
Programming Language(s): Java
Function Summary: Updates user subpages (such as User:StatusBot/Status/TheFearow) to update the status of users
Edit period(s) (e.g. Continuous, daily, one time run): continuous, every 5 minutes
Edit rate requested: 6 edits per minute
Already has a bot flag (Y/N): N
Function Details: This page updates user subpages, such as User:StatusBot/Status/TheFearow, to either say "online" or "offline". These pages can then be transcluded into other templates etc for user status updaters, to see who is online. These can be useful if you need to contact an online admin. The status is deteremined by checking for the users last edit, and seeing if the timestamp is over 15 minutes ago. If it is, it marks offline, otherwise, it marks online.
Discussion
[edit]- I can see a point for this, and a point against it. Is this just going to be for admins? Or anyone who wants it?
- To help users know which 'admins are online', would be a good thing, especially for "newbies" who may not have a wide friend base.
- I know some/many users do do this themselves... But are these edits maybe classable as pointless extra edits...? Im not saying no here, just, is it worthwhile doing? Reedy Boy 14:53, 2 August 2007 (UTC)[reply]
This seems harmless (not necessarily beneficial, just harmless). The bot only edits its own user subpages, it automates a function may users consider tedious, and it introduces no significant server load. (Checking maxlag might be a good idea anyway, though.)
There is one issue related to the definition of "away": a user not editing for the past 15 minutes != that user is away. The inverse is also true. But hopefully those using the bot's services will understand this.
Just a couple of questions about the behavior of the bot, also: does it use a text file, a HashMap/TreeMap, an object for each user, or something else? If the bot uses polling, how often does it poll? Thanks :) GracenotesT § 18:11, 2 August 2007 (UTC)[reply]
- The bot will operate for anyone who adds their userpage to a category. It seems worthwhile, because if they do any edits, they are online. I know the 15 minutes is an approximate time, but it seems correctish, and usually a good indication. The category would have a disclaimer that it is not accurate. For the behaviour, it just checks all users in the category every 5 minutes, using a SQL query directly to the DB (it first checks the dblag, and if its lagged more than a minute, it reads from the api). It does this from the toolserver, checking the latest entry in the "recentchanges" table for the user, and comparing the timestamp of that to the current timestamp. Regarding maxlag, this shouldn't be a huge problem, but does introduce some issues. It's easier to check slave lag directly. Matt/TheFearow (Talk) (Contribs) (Bot) 21:09, 2 August 2007 (UTC)[reply]
- When you check slave lag, you're only checking the lag of the Toolserver's s1 cluster slave. I think it'd be best if you used maxlag in addition to the edit rate you have chosen, only so if one of the slaves in the s1 cluster is lagged, you wait to edit, giving humans priority, until things are stable again. Otherwise, I see no problems with this request. Could we see: 1.) an example of the template this bot would write, and 2.) the source code? — Madman bum and angel (talk – desk) 05:53, 3 August 2007 (UTC)[reply]
- The toolserver slave is usually the most lagged, as it is furthest away geographically, and therefore the slowest. I could try and implement maxlag, but it would take a bit. For 1, this is easy. It's a page with either the content of "online" or "offline". A single word page. For two, ill publish the code on monday, when i've got access to the code again. Matt/TheFearow (Talk) (Contribs) (Bot) 11:06, 3 August 2007 (UTC)[reply]
- When you check slave lag, you're only checking the lag of the Toolserver's s1 cluster slave. I think it'd be best if you used maxlag in addition to the edit rate you have chosen, only so if one of the slaves in the s1 cluster is lagged, you wait to edit, giving humans priority, until things are stable again. Otherwise, I see no problems with this request. Could we see: 1.) an example of the template this bot would write, and 2.) the source code? — Madman bum and angel (talk – desk) 05:53, 3 August 2007 (UTC)[reply]
I think that's best, as the user can then "style" it any way he or she likes, using {{#switch: to add a green/red light, {{ucfirst: to capitalize it, or to do whatever he/she needs to do. Perhaps checking the bot status can be integrated into {{User status}} in the future. The distant future; let's make sure the bot's stable first. I'm willing to give this a trial; however, you mentioned you didn't have access to the code. Do you only have the compiled application? It'd be best if you had the code so any errors could be corrected quickly and the trial could go on. — Madman bum and angel (talk – desk) 15:08, 3 August 2007 (UTC)[reply]
- No, i'm at my dads, codes at my mums. I'll have access monday, I forgot to bring it with me. I did code this myself, and I have the code. And yes, that was my reason for a simple online/offline, it means you can do anything you want with it, rather than having to use a premade template. I can start the trial monday. Matt/TheFearow (Talk) (Contribs) (Bot) 01:21, 4 August 2007 (UTC)[reply]
- Could this bot check for an accounts last action (not just an edit), I'm often online taking care of deletions, but not editnig otherwise. — xaosflux Talk 18:59, 4 August 2007 (UTC)[reply]
- It checks for the last entry in the recentchanges table, so that includes logs etc. So deletions etc would count. Matt/TheFearow (Talk) (Contribs) (Bot) 21:45, 4 August 2007 (UTC)[reply]
- I have added one new feature, it will write User:StatusBot/Status/TheFearow/TimeGone as well as the plain page (User:StatusBot/Status/TheFearow), so users can also have a "Status: online (Gone 23 minutes)" style message, with the TimeGone one being how long they are gone. I think I have answered all questions, and I am ready for a trial.
{{BAGAssistanceNeeded}}
Matt/TheFearow (Talk) (Contribs) (Bot) 21:57, 5 August 2007 (UTC)[reply]
- I have added one new feature, it will write User:StatusBot/Status/TheFearow/TimeGone as well as the plain page (User:StatusBot/Status/TheFearow), so users can also have a "Status: online (Gone 23 minutes)" style message, with the TimeGone one being how long they are gone. I think I have answered all questions, and I am ready for a trial.
- It checks for the last entry in the recentchanges table, so that includes logs etc. So deletions etc would count. Matt/TheFearow (Talk) (Contribs) (Bot) 21:45, 4 August 2007 (UTC)[reply]
- I'm a little confused :/ Is this going to scrape the entire recent contrbutions table, matching names, or is it going to pull contributions lists for people who sign up for it? The later soudns less costly, but will eventually have diminishing returns. — xaosflux Talk 17:03, 6 August 2007 (UTC)[reply]
- Certainly would be less costly - Just have to do something like http://en.wikipedia.org/w/index.php?title=Special:Contributions&limit=2&target=Reedy+Boy - ie a small limit... Reedy Boy 21:53, 6 August 2007 (UTC)[reply]
- It scans a category, and for each user who is signed up, does a single small SQL query to the recentchanges table, to get the timestamp of the last action by that user. That includes log entries and edits. It does pretty much exactly what reedy boy said, but with a limit of 1, and directly into the MySQL server. The query looks something like "SELECT rc_timestamp FROM recentchanges WHERE rc_user_text = TheFearow ORDER BY rc_id DESC LIMIT 1". I think that's pretty accurate, but its not exact. I can get the exact one if necessary. Matt/TheFearow (Talk) (Contribs) (Bot) 22:29, 6 August 2007 (UTC)[reply]
- As the list gets bigger, won't this querey start getting expensive (e.g. Target user hasn't edited in 2 months; and recentchanges isn't indexed by username, so its gong to be longer and longer queries, isn't it?) — xaosflux Talk 03:27, 7 August 2007 (UTC)[reply]
- If the index is added, then that's fine. If not, perhaps users should be removed from the category after a certain amount of time (a month, perhaps?), given that they're instructed in how to rejoin. Also, you might want to reduce the amount of queries you make, combining multiple users into one query. This will be especially advantageous when you have a small number of users. Something like: SELECT MAX(`rc_timestamp`) FROM `recentchanges` WHERE `rc_user_text` IN ('user1', 'user2') GROUP BY `rc_user_text`. Compare the queries and see if it's any faster. — madman bum and angel 04:30, 7 August 2007 (UTC)[reply]
- As the list gets bigger, won't this querey start getting expensive (e.g. Target user hasn't edited in 2 months; and recentchanges isn't indexed by username, so its gong to be longer and longer queries, isn't it?) — xaosflux Talk 03:27, 7 August 2007 (UTC)[reply]
- It scans a category, and for each user who is signed up, does a single small SQL query to the recentchanges table, to get the timestamp of the last action by that user. That includes log entries and edits. It does pretty much exactly what reedy boy said, but with a limit of 1, and directly into the MySQL server. The query looks something like "SELECT rc_timestamp FROM recentchanges WHERE rc_user_text = TheFearow ORDER BY rc_id DESC LIMIT 1". I think that's pretty accurate, but its not exact. I can get the exact one if necessary. Matt/TheFearow (Talk) (Contribs) (Bot) 22:29, 6 August 2007 (UTC)[reply]
- Hold on. I don't like the (time gone) feature unless it's a template that does some sort of date/time calculation based on the current time. The bot should not be editing that often. — madman bum and angel 02:58, 7 August 2007 (UTC)[reply]
- It's only editing every 5 minutes. Also, regarding the expensive query, i'll just get recentchanges indexed by username. I believe you can just request that such an index is placed to the toolserver admins, which I will do. Matt/TheFearow (Talk) (Contribs) (Bot) 04:23, 7 August 2007 (UTC)[reply]
- I still think that users don't need this feature, and it places an unnecessary load on the project's servers. You don't need to be updating one page for every single user you monitor, every five minutes. — madman bum and angel 04:26, 7 August 2007 (UTC)[reply]
- Ok. I'll skip the time gone. Now its just one page per user edited whenever their status changes. That's a lot less load. Matt/TheFearow (Talk) (Contribs) (Bot) 05:02, 7 August 2007 (UTC)[reply]
- I still think that users don't need this feature, and it places an unnecessary load on the project's servers. You don't need to be updating one page for every single user you monitor, every five minutes. — madman bum and angel 04:26, 7 August 2007 (UTC)[reply]
- It's only editing every 5 minutes. Also, regarding the expensive query, i'll just get recentchanges indexed by username. I believe you can just request that such an index is placed to the toolserver admins, which I will do. Matt/TheFearow (Talk) (Contribs) (Bot) 04:23, 7 August 2007 (UTC)[reply]
Approved for trial. Please provide a link to the relevant contributions and/or diffs when the trial is complete. – Twenty-five updates, for you or whomever you can rope into volunteering. — madman bum and angel 05:15, 7 August 2007 (UTC)[reply]
- Great. Anyone interested should add themselves to Category:Wikipedians who use StatusBot. Matt/TheFearow (Talk) (Contribs) (Bot) 05:20, 7 August 2007 (UTC)[reply]
- It's now editing! I had some issues with edittokens, apparentally they are supposed to be URL encoded - that took a while. It's now working. Matt/TheFearow (Talk) (Contribs) (Bot) 04:59, 13 August 2007 (UTC)[reply]
- Eep, my bad. I stuffed up the stop-at-50 code, and its continued on auto. It isnt a major issue, as its a slow edit rate, but I apologise about that. At least there is plenty of edits to evaluate :-) Any problems, or is this approved? {{BAGAssistanceNeeded}} Matt/TheFearow (Talk) (Contribs) (Bot) 22:10, 13 August 2007 (UTC)[reply]
- I'd like to see some more of this to get a better idea for the edit rates with more users,
Approved for trial (1000 edits or 10 days, userspace only). Please provide a link to the relevant contributions and/or diffs when the trial is complete. — xaosflux Talk 00:17, 14 August 2007 (UTC)[reply]
- I've added a ver active user User:OrphanBot to the category to see what happens. — xaosflux Talk 00:21, 14 August 2007 (UTC)[reply]
- I like the idea of this bot. It might also be nicely applicable for BFRAs/bots in general, as well. Consider: the bot status page is a little chaotic, so it'd be kind of cool if that was updated daily based on approved bots' last edit times. E.g., there would be active, inactive, and discontinued bots, but each would have a last active time, as well (and, possibly, every 20 minutes or so update the status of all of the bots to reflect whether they're currently active). *shrug* Just tossing around ideas. =) --slakr 00:40, 14 August 2007 (UTC)[reply]
- Sounds good, and wouldnt be too hard to implement. You could just add the cat to the bots userpages, and then transclude the status from the bot status page. But maybe another bot would be good - i'll think about it. Matt/TheFearow (Talk) (Contribs) (Bot) 01:46, 14 August 2007 (UTC)[reply]
- Can you have the edit summary of the status page include what the status is changing to? — xaosflux Talk 05:03, 14 August 2007 (UTC)[reply]
- Sure, i'll do that tonight. Matt/TheFearow (Talk) (Contribs) (Bot) 07:07, 14 August 2007 (UTC)[reply]
- Can you have the edit summary of the status page include what the status is changing to? — xaosflux Talk 05:03, 14 August 2007 (UTC)[reply]
- Only one little thing ive noticed... I dont know what anyone elses opinion is, but with the 15 minute interval, ive been marked online, and then offline, then online, as ive been busy doing other things... I personally think it would be better at 30 minutes. Or is that just me? Or any other suggestions? Reedy Boy 11:08, 17 August 2007 (UTC)[reply]
- Reedy Boy, I am going to have to agree with you on that commment. I do believe that 15 minutes is a bit too soon and should be extended at least 15 minutes more. TheFearow, could you please try this? — E talkbots 21:53, 17 August 2007 (UTC)[reply]
- Whether it bases 30 minutes from the last edit as offline - Or just wont update the user page for a min of 30 mins of the last edit, that would be fine. Reedy Boy 22:10, 17 August 2007 (UTC)[reply]
- Reedy Boy, I am going to have to agree with you on that commment. I do believe that 15 minutes is a bit too soon and should be extended at least 15 minutes more. TheFearow, could you please try this? — E talkbots 21:53, 17 August 2007 (UTC)[reply]
- This program could work with real time information and not burden the server at all if it watches the IRC feed. ((1 == 2) ? (('Stop') : ('Go')) 22:15, 17 August 2007 (UTC)[reply]
- I will update to 30 minutes on monday. Also, IRC feed would require a redesign, and this current method does not burden that much. Matt/TheFearow (Talk) (Contribs) (Bot) 22:56, 17 August 2007 (UTC)[reply]
- Great, when you're ready for a small trial on the 30 minute update revision, let us know and I can put you on another small trial. — E talkbots 23:17, 17 August 2007 (UTC)[reply]
- Well, i'm still on the 10-day trial, so it'll keep going till the 24th. Ill update it in a day or so, so itll have ~4 days of trial running on the new times anyway. Matt/TheFearow (Talk) (Contribs) (Bot) 23:41, 17 August 2007 (UTC)[reply]
- Didn't see that! Feel free to start the trial in the current trial time. Post your results when done. — E talkbots 00:00, 18 August 2007 (UTC)[reply]
- Please be sure to report any issues that come up here as well. — xaosflux Talk 04:49, 19 August 2007 (UTC)[reply]
- Didn't see that! Feel free to start the trial in the current trial time. Post your results when done. — E talkbots 00:00, 18 August 2007 (UTC)[reply]
- Well, i'm still on the 10-day trial, so it'll keep going till the 24th. Ill update it in a day or so, so itll have ~4 days of trial running on the new times anyway. Matt/TheFearow (Talk) (Contribs) (Bot) 23:41, 17 August 2007 (UTC)[reply]
- Great, when you're ready for a small trial on the 30 minute update revision, let us know and I can put you on another small trial. — E talkbots 23:17, 17 August 2007 (UTC)[reply]
- I will update to 30 minutes on monday. Also, IRC feed would require a redesign, and this current method does not burden that much. Matt/TheFearow (Talk) (Contribs) (Bot) 22:56, 17 August 2007 (UTC)[reply]
I've been thinking about an enhancement, but it would need to happen sooner then later. Instead of updating the status page with "online/offline" Can you think of a good way to make it be Online/Offline since TIME, without breaking the templates too much? — xaosflux Talk 04:49, 19 August 2007 (UTC)[reply]
- I suggested that above, and programmed it, but madman didn't like the idea. It already calculates minutes/hours/days/weeks/years gone, so it wouldnt be hard to do. Matt/TheFearow (Talk) (Contribs) (Bot) 05:15, 19 August 2007 (UTC)[reply]
- Hmm, TimeGone would need to be continually updated each cycle, but a LastOnAt would only have to get updated during an offline-->online transistion. — xaosflux Talk 23:28, 19 August 2007 (UTC)[reply]
- That might work - but it still doubles the edits. If you think that's fine, i'll add it tonight. Matt/TheFearow (Talk) (Contribs) (Bot) 00:28, 20 August 2007 (UTC)[reply]
- I'm not opposed to (since <last edit>). Why would it double the edits? — madman bum and angel 04:25, 20 August 2007 (UTC)[reply]
- Because then it has to update the "last status change" as well as the status each time the status changes. Also, I thought you were opposed per:
- I'm not opposed to (since <last edit>). Why would it double the edits? — madman bum and angel 04:25, 20 August 2007 (UTC)[reply]
- That might work - but it still doubles the edits. If you think that's fine, i'll add it tonight. Matt/TheFearow (Talk) (Contribs) (Bot) 00:28, 20 August 2007 (UTC)[reply]
- Hmm, TimeGone would need to be continually updated each cycle, but a LastOnAt would only have to get updated during an offline-->online transistion. — xaosflux Talk 23:28, 19 August 2007 (UTC)[reply]
Hold on. I don't like the (time gone) feature unless it's a template that does some sort of date/time calculation based on the current time. The bot should not be editing that often.
- Thanks! Matt/TheFearow (Talk) (Contribs) (Bot) 04:30, 20 August 2007 (UTC)[reply]
- I was opposed to gone for 1 hour, then gone for 2 hours, then gone for 3 hours, etc. I'm not at all opposed to "since [this time]". And yes, I just realized why it has double edits, it won't be editing the same page as the status. I was just about to ask if that would break compatibility. — madman bum and angel 04:33, 20 August 2007 (UTC)[reply]
- I'm going to go ahead and add a last edit thing now. Then it should be up and running. Matt/TheFearow (Talk) (Contribs) (Bot) 04:35, 20 August 2007 (UTC)[reply]
- I was opposed to gone for 1 hour, then gone for 2 hours, then gone for 3 hours, etc. I'm not at all opposed to "since [this time]". And yes, I just realized why it has double edits, it won't be editing the same page as the status. I was just about to ask if that would break compatibility. — madman bum and angel 04:33, 20 August 2007 (UTC)[reply]
- Thanks! Matt/TheFearow (Talk) (Contribs) (Bot) 04:30, 20 August 2007 (UTC)[reply]
- Added, you can see in contribs it's working. Matt/TheFearow (Talk) (Contribs) (Bot) 04:48, 20 August 2007 (UTC)[reply]
- Could you normalize the time see this diff for an example. — xaosflux Talk 02:47, 21 August 2007 (UTC)[reply]
- What's not normal about it? It's an identical format. Matt/TheFearow (Talk) (Contribs) (Bot) 21:22, 21 August 2007 (UTC)[reply]
- The entry in that diff shows: "21/8/2007 2:8:15", but "21/8/2007 2:08:15" would be standard (missing leading zero's for mins and secs figures for values <10). Personally I hate your choice of endianness on the date values, but respect your choice there. — xaosflux Talk 02:40, 23 August 2007 (UTC)[reply]
- What's not normal about it? It's an identical format. Matt/TheFearow (Talk) (Contribs) (Bot) 21:22, 21 August 2007 (UTC)[reply]
- Could you normalize the time see this diff for an example. — xaosflux Talk 02:47, 21 August 2007 (UTC)[reply]
- Ahh, I could zero-pad. Also, would it be easier to use subpages of the LastEdit page for both D/M and M/D configurations, then transclude the M/D onto the lastedit page? Matt/TheFearow (Talk) (Contribs) (Bot) 05:01, 23 August 2007 (UTC)[reply]
- 10 days trial all successful. Few minor issues, as above, but have been fixed -
Approved.. Oh, and this bot SHALL run with a flag Reedy Boy 21:56, 26 August 2007 (UTC)[reply]
- Issues fixed, and bot ready to run. Matt/TheFearow (Talk) (Contribs) (Bot) 21:58, 26 August 2007 (UTC)[reply]
- The above discussion is preserved as an archive of the debate. Please do not modify it. Subsequent comments should be made in a new section.