aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Hurst2017-06-09 13:55:50 -0600
committerDavid Hurst2017-06-20 11:10:05 -0600
commit24ea235abc3c9087a20d94c7ae8826b7106436c9 (patch)
treeb320ccdb693423080d2bc89e8154fabf0ae6f153
parent4ec9d8f1919c091a8c0f6cc1482103723ae9e287 (diff)
downloadeventmq-24ea235abc3c9087a20d94c7ae8826b7106436c9.tar.gz
eventmq-24ea235abc3c9087a20d94c7ae8826b7106436c9.zip
Add wal docs
-rw-r--r--docs/settings_file.rst14
-rw-r--r--eventmq/conf.py4
-rw-r--r--eventmq/router.py4
3 files changed, 18 insertions, 4 deletions
diff --git a/docs/settings_file.rst b/docs/settings_file.rst
index 43c922c..c758a16 100644
--- a/docs/settings_file.rst
+++ b/docs/settings_file.rst
@@ -30,6 +30,20 @@ Default: 'tcp://127.0.0.1:47291'
30 30
31The address used to listen for connections from workers 31The address used to listen for connections from workers
32 32
33wal
34=======
35Default: '/var/log/eventmq/wal.log'
36
37Write-ahead Log for replaying messages received by the Router. Will
38try to create the directory specified and append to the filename given.
39Requires correct permissions to write to the given file.
40
41wal_enabled
42===============
43Default: False
44
45Enable or disable the Write-ahead Log
46
33********* 47*********
34Scheduler 48Scheduler
35********* 49*********
diff --git a/eventmq/conf.py b/eventmq/conf.py
index 995e970..8609716 100644
--- a/eventmq/conf.py
+++ b/eventmq/conf.py
@@ -97,7 +97,7 @@ SETUP_CALLABLE = ''
97KILL_GRACE_PERIOD = 300 97KILL_GRACE_PERIOD = 300
98GLOBAL_TIMEOUT = 300 98GLOBAL_TIMEOUT = 300
99 99
100WAL_LOG = '/var/log/eventmq/wal.log' 100WAL = '/var/log/eventmq/wal.log'
101WAL_LOG_ENABLED = False 101WAL_ENABLED = False
102 102
103# }}} 103# }}}
diff --git a/eventmq/router.py b/eventmq/router.py
index 4ab93f2..1d0da0a 100644
--- a/eventmq/router.py
+++ b/eventmq/router.py
@@ -709,7 +709,7 @@ class Router(HeartbeatMixin):
709 709
710 command = message[1] 710 command = message[1]
711 711
712 if conf.WAL_LOG_ENABLED and \ 712 if conf.WAL_ENABLED and \
713 command in ("REQUEST", "SCHEDULE", "UNSCHEDULE"): 713 command in ("REQUEST", "SCHEDULE", "UNSCHEDULE"):
714 wal_logger.info(original_msg) 714 wal_logger.info(original_msg)
715 715
@@ -934,7 +934,7 @@ class Router(HeartbeatMixin):
934 """ 934 """
935 setup_logger('eventmq') 935 setup_logger('eventmq')
936 import_settings() 936 import_settings()
937 setup_wal_logger('eventmq-wal', conf.WAL_LOG) 937 setup_wal_logger('eventmq-wal', conf.WAL)
938 self.start(frontend_addr=conf.FRONTEND_ADDR, 938 self.start(frontend_addr=conf.FRONTEND_ADDR,
939 backend_addr=conf.BACKEND_ADDR, 939 backend_addr=conf.BACKEND_ADDR,
940 administrative_addr=conf.ADMINISTRATIVE_ADDR) 940 administrative_addr=conf.ADMINISTRATIVE_ADDR)