Thursday 31 May 2012

Cron Script for Karma plugin

In my last post, I wrote about the integration of Karma Plugin for Connect, with Bugzilla. Since then, I have progressed onto developing a cron script for the plugin which fetches user activities from various sources like Bugzilla, Twitter, Planet OpenSUSE etc and calculates score based on that . So now, Karma details are  fetched for every user on Connect regularly and stored in the database.

Previously, details were fetched on every view of the widget, which was a gross mistake on my part and my mentor Michal suggested that rather than fetching details on every view of the widget, some caching would be a better idea.

The best solution to that was coming up with a cron script. That solved out two purposes, one, karma details could now be fetched from the database, so there was no need to make a call to Bugzilla or other sources on every view of the widget, second, we always wanted score to be calculated on a regular basis rather than only when the user logged in, so we needed a cron script anyway :)

I am still thinking of other sources that I could use for fetching karma details apart fron Twitter, OBS, Planet OpenSUSE and Bugzilla. If any great idea stikes you, do let me know, I'll be most happy to incorporate it. 

2 comments:

  1. 1. forums, they even have their own statistics I think (ask in the moderator forum).
    2. Mailinglist posts (talk to ml-admin@o.o).
    3. I'm sure you can come up with one metric from connect itself :-)

    ReplyDelete
  2. Yes we could use Polls as metric from Connect, or even the members of Geekos group could be awarded with significant karma.
    Thanks for the ideas :)

    ReplyDelete