myexperiment-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[myexperiment-hackers] [2022] branches/invitation_throttling/app/models/


From: noreply
Subject: [myexperiment-hackers] [2022] branches/invitation_throttling/app/models/activity_limit.rb: Throttling.
Date: Mon, 1 Dec 2008 12:48:38 -0500 (EST)

Revision
2022
Author
alekses6
Date
2008-12-01 12:48:37 -0500 (Mon, 01 Dec 2008)

Log Message

Throttling. One-time promotions that make the feature unlimited now disable counter resets.

Modified Paths

Diff

Modified: branches/invitation_throttling/app/models/activity_limit.rb (2021 => 2022)


--- branches/invitation_throttling/app/models/activity_limit.rb	2008-12-01 16:08:00 UTC (rev 2021)
+++ branches/invitation_throttling/app/models/activity_limit.rb	2008-12-01 17:48:37 UTC (rev 2022)
@@ -51,6 +51,13 @@
             # (if the absolute max value is set - set limit to it; if not - the feature becomes unlimited)
             limit.limit_max = absolute_max_limit_value
             limit.promote_after = nil
+            
+            if limit.limit_max.nil?
+              # the feature has become unlimited; no need to reset the counter anymore - 
+              # just keep it running to see usage of the feature by the user
+              limit.limit_frequency = nil
+              limit.reset_after = nil
+            end
           end   
         end # END of PROMOTION code
         

reply via email to

[Prev in Thread] Current Thread [Next in Thread]