Monday 25 June 2012

Karma update on Widget view


Weekly Report (14 june - 21 june)

In my last report I mentioned about having separate developer and marketing Karma, as I had problems comparing tweeting with Bug fixes or commits. Well, I have accomplished that. We have separate Developer karma for score achieved on fixing bugs or making commits on OBS, Marketing karma for score achieved on tweeting  and posting on Planet openSUSE. Appropriate badges are awarded on securing a higher developer or marketing karma.


During this time  Michal my mentor, tried deploying Karma on the Connect website, but the karma cron script would not run to completion for all Connect users due to certain limits on server or gateway or both. So the idea was to reorder the query and run cron script more number of times with less users each time.


Within the cron script, I save the time of the last run as metadata belonging to a user entity. Then use this metadata to order the query and get 5 users who have been the longest without updating. Cron script now runs every five minutes for 5 users who have remained longest without updating.


This would work with users who already have the karma last update time saved in the database somewhere, so the cron script also assigns this metadata to all users to whom it has not been assigned yet.

 
Then I also worked out the updation of karma on widget view (this is not a part of the cron script). If karma was updated more than one hour ago then karma details are updated on widget view. Assuming Connect has 2000  - 3000 users it would take 33 - 50 hours to update for all users and come back to the first one, if we relied only on the cron script.


Hence, this suffices for situations when karma has not been updated in time by the cron script.

No comments:

Post a Comment