dimanche 26 février 2017

Best practice for updating user 'rank' using a cron job

In my site I have users who can create posts, make a description, upload profile picture, provide email address etc

I want to give users a 'score' or 'rank' depending upon how much they have updated their account. For example, providing a profile pic will be +10 points, a long description will be +5 points, making a post will be +2 points etc

I was going to have a user model method that when executed updates their score and adds it to a column in the users table.

It was suggested to me that I use a cron job for this, and update it once a day as opposed to updating every time the user makes a change to their account.

I was wondering what was best practice for this, and where I should store the user's 'score'.



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2lUU2TA
via IFTTT

Aucun commentaire:

Enregistrer un commentaire