use PLC_RATELIMIT_ENABLED to enable ratelimit aspect
authorBaris Metin <bmetin@verivue.com>
Mon, 11 Apr 2011 20:37:09 +0000 (16:37 -0400)
committerBaris Metin <bmetin@verivue.com>
Mon, 11 Apr 2011 20:37:09 +0000 (16:37 -0400)
PLC/API.py
aspects/__init__.py

index 191720d..308fa11 100644 (file)
@@ -147,6 +147,10 @@ class PLCAPI:
         if self.config.PLC_OMF_ENABLED:
             from aspects import apply_omf_aspect
             apply_omf_aspect()
+        
+        if self.config.PLC_RATELIMIT_ENABLED:
+            from aspects import apply_ratelimit_aspect
+            apply_ratelimit_aspect()
 
 
     def callable(self, method):
index cdab6d6..aa7b05c 100644 (file)
@@ -7,6 +7,8 @@ from aspects.ratelimitaspects import RateLimitAspect
 def apply_omf_aspect():
     # track all PLC methods to add OMF hooks
     weave_class_method(OMFAspect(), Method, "__call__")
+
+def apply_ratelimit_aspect():
     weave_class_method(RateLimitAspect(), Method, "__call__")
 
 def apply_debugger_aspect():