README.markdown in resque-restriction-0.3.0 vs README.markdown in resque-restriction-0.4.0
- old
+ new
@@ -39,20 +39,21 @@
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.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 restriction_identifiers can restrict different job execution numbers.
+
Contributing
------------
Once you've made your commits:
@@ -67,9 +68,11 @@
Richard Huang :: flyerhzm@gmail.com :: @flyerhzm
Contributors
------------
Matt Conway :: matt@conwaysplace.com :: @mattconway
+
+Martin Fourcade :: fourcade.m@gmail.com :: @mfourcade
Copyright
---------
Copyright (c) 2010 Richard Huang. See LICENSE for details.