README.markdown in resque-restriction-0.2.2 vs README.markdown in resque-restriction-0.3.0

- old
+ new

@@ -7,10 +7,15 @@ 2. it will execute the exceeded jobs at the next period. For example, you restrict the email sending jobs to run 1000 times per day. If your system generates 1010 email sending jobs, only 1000 email sending jobs can be executed today, and the other 10 email sending jobs will be executed tomorrow. Resque Restriction requires Resque 1.7.0. +Attention +--------- + +The <code>identifier</code> method is renamed to <code>restriction_identifier</code> to solve the confliction with resque-retry from version 0.3.0. + Install ------- sudo gem install resque-restriction @@ -35,17 +40,17 @@ You can also add customized restriction as you like. For example, we have a job to restrict the facebook post numbers 40 times per user per day, we can define as: class GenerateFacebookShares < Resque::Plugins::RestrictionJob restrict :per_day => 40 - def self.identifier(options) + def self.restriction_identifier(options) [self.to_s, options["user_id"]].join(":") end #rest of your class here end -options["user_id"] returns the user's facebook uid, the key point is that the different identifiers can restrict different job execution numbers. +options["user_id"] returns the user's facebook uid, the key point is that the different restriction_identifiers can restrict different job execution numbers. Contributing ------------ Once you've made your commits: