From 40785ed42aacff32beac8f18cb65e5534eb9d064 Mon Sep 17 00:00:00 2001
From: Baris Metin <bmetin@verivue.com>
Date: Mon, 11 Apr 2011 16:37:09 -0400
Subject: [PATCH] use PLC_RATELIMIT_ENABLED to enable ratelimit aspect

---
 PLC/API.py          | 4 ++++
 aspects/__init__.py | 2 ++
 2 files changed, 6 insertions(+)

diff --git a/PLC/API.py b/PLC/API.py
index 191720dd..308fa11a 100644
--- a/PLC/API.py
+++ b/PLC/API.py
@@ -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):
diff --git a/aspects/__init__.py b/aspects/__init__.py
index cdab6d60..aa7b05c5 100644
--- a/aspects/__init__.py
+++ b/aspects/__init__.py
@@ -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():
-- 
2.47.0