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: Chris G

Automatic or Manually Assisted: Auto

Programming Language(s): Perl using perl wikipedia

Function Summary: A clone of status bot, that may turn into a back up status bot if status bot starts running again.

Edit period(s) (e.g. Continuous, daily, one time run): Continuous

Edit rate requested: 6 edits per min

Already has a bot flag (Y/N):no

Function Details: This bot 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]

Just one question: how are you checking the users last edit? Are you querying every couple of minutes? Are you following the recent changes feed? If you are querying every couple of minutes, I'm not sure if you're aware of a handy feature of api.php, where you can query for any user's last contribution: http://en.wikipedia.org/w/api.php?action=query&list=usercontribs&ucuser=USER_NAME_HERE&uclimit=1. —METS501 (talk) 13:22, 14 September 2007 (UTC)[reply]

Thanks for that api query it just saved me some time looking round in the api's documentation. --Chris  G  01:12, 16 September 2007 (UTC)[reply]

Will this bot use the original page and category structure from StatusBot? — xaosflux Talk 13:57, 14 September 2007 (UTC) Will this bot look for non-"edits" (e.g. Admin Actions) to determine status? — xaosflux Talk 13:57, 14 September 2007 (UTC)[reply]

Yes the bot will use the original page and category structure from StatusBot and at the moment it doesn't look for non-"edits" (e.g. Admin Actions) to determine status, however I am going to try and make it use logged actions to determine status. --Chris  G  01:12, 16 September 2007 (UTC)[reply]
Sounds good to me :) How's it coming along? SQL(Query Me!) 11:41, 20 September 2007 (UTC)[reply]
I've done the bulk of the coding, at the moment all I'm doing is adding in the log feature(see above) and I'm also going to try and add this. --Chris  G  04:39, 22 September 2007 (UTC)[reply]
Since StatusBot may be revived and this bot will act as a backup I will keep the pages on StatusBot's userspace. --Chris  G  11:14, 28 September 2007 (UTC)[reply]
Sounds good. So, when is it going to be deployed/tested? Titoxd(?!? - cool stuff) 21:27, 28 September 2007 (UTC)[reply]
I'm just doing a last check over the code and then Its just a matter of waiting for the bag to approve for a trial run. --Chris  G  04:21, 29 September 2007 (UTC)[reply]
Approved for trial (500 edits or 10 days, userspace only). Please provide a link to the relevant contributions and/or diffs when the trial is complete. There you go! Please maintain a list of any issues you are having and report ones not quickly resolved back here. Thanks! — xaosflux Talk 00:15, 30 September 2007 (UTC)[reply]
Problem number 1: For some reason perlwikipedia doesn't want to return a list of the cat, I'm going to run the bot from an offline list while I try and the problem up. --Chris  G  06:12, 2 October 2007 (UTC)[reply]

Fixed it! -Chris  G  07:00, 2 October 2007 (UTC)[reply]

While I like the new format better, do you see any issues with using a different date format then the other bot? — xaosflux Talk 11:45, 2 October 2007 (UTC)[reply]
Yes, that could prove a problem, my bot doesn't need the page it only updates it because the templates uses it, I'll ask TheFearow, when he gets back. --Chris  G 

The bot stopped working about 20 minutes ago. Was that supposed to happen? NASCAR Fan24(radio me!) 20:12, 2 October 2007 (UTC)[reply]

No, I've got it back up and running now, the problem was that it ran into an error editing a page and due to my use of:
or die "ERROR Editing $pagename : $!";
the bot died, the strange thing is that the error was saying something about page permissions when the page was not protected? I've removed the
or die
for now until I can work out what went wrong. --Chris  G  02:12, 3 October 2007 (UTC)[reply]
The bot died again. Last edit was at 13:46 (UTC-4). NASCAR Fan24(radio me!) 20:00, 3 October 2007 (UTC)[reply]
Both of the time the bot died was due to excessive memory usage, so slayerd killed it, I think I've fixed the problem. --Chris  G  06:16, 5 October 2007 (UTC)[reply]

Just one question: You said that the bot would check the time of the last edit and if it's over 15 minutes ago, the user is considered offline. What about users who don't edit as frequently, but rather read articles and use WP for information? In that case, it would be unfair to mark them as offline. Powerfulmindtalkedits 20:57, 5 October 2007 (UTC)[reply]

Currently adding support for that via a config page, should have that up and running in a few days time. --Chris  G  12:37, 6 October 2007 (UTC)[reply]
((D|OperatorAssistanceNeeded)) I'm stating the obvious, but I want this on the record. The bot died again. Bushcarrot Talk Please Sign! Let's go Lightning! 01:42, 6 October 2007 (UTC)[reply]
Ok, the bot was killed by slayerd again but I think I've fixed it now, I've also fixed a bug with quering the api that made the bot retrieve the users second last edit, I will be posting the source soon. --Chris  G  12:37, 6 October 2007 (UTC)[reply]

OperatorAssistanceNeeded The bot died again. Are you sure it's not going to face the same fate as StatusBot? NASCAR Fan24(radio me!) 16:20, 7 October 2007 (UTC)[reply]

I have the same question. Last status update to my account was 2007-10-05 17:17 (UTC). I've been online multiple times since. -- Rob C. alias Alarob 00:19, 10 October 2007 (UTC)[reply]

12 October 2007

[edit]

I've fixed it!(I think) if I doesn't die by the morning the it is fixed and then I can get to work on some cool new features! :) --Chris  G  10:55, 12 October 2007 (UTC)[reply]

It works fine for me, it was a 3 minute delay but it did update it right. --Coastergeekperson04 23:48, 12 October 2007 (UTC)[reply]
That's funny. My status remains offline, but the "since" date gets updated. Currently it's at 2007-10-13 00:33 (UTC). -- Rob C. alias Alarob 01:33, 13 October 2007 (UTC)[reply]
Working well now. Lag in updates is reasonable. -- Rob C. alias Alarob 17:47, 13 October 2007 (UTC)[reply]
I've just realised that the bot has gone over both set limits for its trail so ((BAGAssistanceNeeded)) thumbs up, down or a longer trial? --Chris  G  08:21, 16 October 2007 (UTC)[reply]
Has it been turned off? It's not updating me (in any case)... Dihydrogen Monoxide (H2O) 08:29, 16 October 2007 (UTC)[reply]
Thats just a bit of an update lag, how long was it incorrect for? Also it has not been turned off since it s running harmlessly but if you want to you can change one of its subpages to turn it off(take a look on its usepage for the link, I can't be stuffed finding the link my self(my internet is playing up)) --Chris  G  08:41, 16 October 2007 (UTC)[reply]
Nothing major... But ive left a message on your talk page. Its marking me online sometimes when i havent made an edit... Seems to be when i have had talk page activity. Reedy Boy 11:46, 16 October 2007 (UTC)[reply]
  • It stopped working for me yesterday and today. It used to always work during TW patrol, but if it doesn't update this edit, oh well. I thought this was going to work out fine, hopefully it'll get approved. I still wouldn't yet if I was part of BAG. --Coastergeekperson04 01:01, 20 October 2007 (UTC)[reply]
Okay it worked, but it delayed alot. --Coastergeekperson04 02:47, 20 October 2007 (UTC)[reply]
I Think these problems have to do with the bug shown above(permission error), I'm working on a fix. --Chris  G  12:17, 20 October 2007 (UTC)[reply]
What's the update lag like now? Better or worse? --Chris  G  02:34, 21 October 2007 (UTC)[reply]
Been editing for about a half hour and no update. Q T C 01:10, 23 October 2007 (UTC)[reply]
First edit was at 19:46, October 22, 2007, commented here at 20:10, October 22, 2007, bot set me 'online' at 20:12, October 22, 2007. Didn't make another edit till now, but I'm still online (according to the bot). Q T C 02:02, 23 October 2007 (UTC)[reply]
And then took 55 minutes to say I was offline. Q T C 04:46, 23 October 2007 (UTC)[reply]
Ok so some users have a low lag and others have a high lag, I think this all has to do with the bug above which is most likely a bug in perl wikipedia so I'm going to update the bots perlwikipedia.pm file tonight when I can use my computer that accesses hemlock. --Chris  G  08:17, 23 October 2007 (UTC)[reply]

Ok just updated Perlwikipedia.pm and so far so good, anyone still having an overly high update lag? --Chris  G  10:19, 23 October 2007 (UTC)[reply]

I'll test it again, but I can also confirm that Perlwikipedia has horrible memory leak or something somewhere in the code, which is mainly why I dropped it in my code. Q T C 00:48, 24 October 2007 (UTC)[reply]
What do you use instead? Have you written your own module, if so can I see the source? And does it use the api? --Chris  G  10:28, 24 October 2007 (UTC)[reply]
I was offline for several hours, when the bot updated me to online without having edited anything. — xaosflux Talk 05:10, 24 October 2007 (UTC)[reply]
Dat not good! Bad medicine! I'll take a good look through the code. --Chris  G  10:28, 24 October 2007 (UTC)[reply]
It seems to update whenever I leave it on edit mode for a long time, whether I save it or not. And how often does it do a query? It stops every now and then (like now) and works good, then stops, then good, then good again, then bad, etc. --Coastergeekperson04 04:37, 26 October 2007 (UTC)[reply]
If there are no ERRORS being made (slowness not withstanding) I think it's time to move this to approved and flag it. Improvements can always be made. Any objections? — xaosflux Talk 16:51, 31 October 2007 (UTC)[reply]

((BAGAssistanceNeeded)) What do you guys think about flagging the bot now? Bushcarrot Talk Please Sign! Let's go Lightning! 03:10, 2 November 2007 (UTC)[reply]

Per my above statement I'm OK with it, I've left the operator a talk ping to check in if there are any other issues. To keep it official until I'm extending trials for another 5000 edits. — xaosflux Talk 03:37, 2 November 2007 (UTC)[reply]
Apart from the slowness (which I'm pretty sure is perlwikipedia) the bot is running fine. It may be a while until I find/code something to replace perlwikipedia with(I'm busy juggling a few things at the moment) --Chris  G  10:16, 2 November 2007 (UTC)[reply]

 Approved. Will run with a flag. — xaosflux Talk 12:04, 2 November 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.