summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarko Kreen2011-09-21 13:23:04 +0000
committerMarko Kreen2011-09-21 13:43:07 +0000
commitd53ffb14a58bde2f632258f980225db2e7c00d22 (patch)
tree9cbe07fff67a200e98334de5e18f2da8df47bab9
parentdf8fd7574c5f332c48eb11f48dab91a3bdcd329f (diff)
Rename fake_local to vtable, move to separate file
-rw-r--r--python/londiste/handlers/__init__.py6
-rw-r--r--python/londiste/handlers/qtable.py16
-rw-r--r--python/londiste/handlers/vtable.py25
3 files changed, 31 insertions, 16 deletions
diff --git a/python/londiste/handlers/__init__.py b/python/londiste/handlers/__init__.py
index 66853d75..764518ef 100644
--- a/python/londiste/handlers/__init__.py
+++ b/python/londiste/handlers/__init__.py
@@ -3,12 +3,14 @@ import new
import sys
DEFAULT_HANDLERS = [
- 'londiste.handlers.bulk',
'londiste.handlers.qtable',
- 'londiste.handlers.dispatch',
'londiste.handlers.applyfn',
'londiste.handlers.part',
'londiste.handlers.multimaster',
+ 'londiste.handlers.vtable',
+
+ 'londiste.handlers.bulk',
+ 'londiste.handlers.dispatch',
]
def handler_args(name, cls):
diff --git a/python/londiste/handlers/qtable.py b/python/londiste/handlers/qtable.py
index 443d2496..b904e0e1 100644
--- a/python/londiste/handlers/qtable.py
+++ b/python/londiste/handlers/qtable.py
@@ -16,7 +16,7 @@ from londiste.handler import BaseHandler
import pgq
-__all__ = ['QueueTableHandler', 'FakeLocalHandler', 'QueueSplitterHandler']
+__all__ = ['QueueTableHandler', 'QueueSplitterHandler']
class QueueTableHandler(BaseHandler):
@@ -36,17 +36,6 @@ class QueueTableHandler(BaseHandler):
def needs_table(self):
return False
-class FakeLocalHandler(BaseHandler):
- handler_name = 'fake_local'
-
- def add(self, trigger_arg_list):
- trigger_arg_list.append('virtual_table')
-
- def needs_table(self):
- return False
-
-
-
class QueueSplitterHandler(BaseHandler):
handler_name = 'qsplitter'
@@ -89,5 +78,4 @@ class QueueSplitterHandler(BaseHandler):
return False
-__londiste_handlers__ = [QueueTableHandler, FakeLocalHandler,
- QueueSplitterHandler]
+__londiste_handlers__ = [QueueTableHandler, QueueSplitterHandler]
diff --git a/python/londiste/handlers/vtable.py b/python/londiste/handlers/vtable.py
new file mode 100644
index 00000000..2f5fd551
--- /dev/null
+++ b/python/londiste/handlers/vtable.py
@@ -0,0 +1,25 @@
+"""Virtual Table.
+"""
+
+from londiste.handler import BaseHandler
+
+__all__ = ['VirtualTableHandler', 'FakeLocalHandler']
+
+class VirtualTableHandler(BaseHandler):
+ """Virtual Table.
+
+ """
+ handler_name = 'vtable'
+
+ def add(self, trigger_arg_list):
+ trigger_arg_list.append('virtual_table')
+
+ def needs_table(self):
+ return False
+
+class FakeLocalHandler(VirtualTableHandler):
+ """Deprecated compat name for vtable."""
+ handler_name = 'fake_local'
+
+__londiste_handlers__ = [VirtualTableHandler, FakeLocalHandler]
+