diff options
| author | David Hurst | 2017-06-09 13:55:50 -0600 |
|---|---|---|
| committer | David Hurst | 2017-06-20 11:10:05 -0600 |
| commit | 24ea235abc3c9087a20d94c7ae8826b7106436c9 (patch) | |
| tree | b320ccdb693423080d2bc89e8154fabf0ae6f153 | |
| parent | 4ec9d8f1919c091a8c0f6cc1482103723ae9e287 (diff) | |
| download | eventmq-24ea235abc3c9087a20d94c7ae8826b7106436c9.tar.gz eventmq-24ea235abc3c9087a20d94c7ae8826b7106436c9.zip | |
Add wal docs
| -rw-r--r-- | docs/settings_file.rst | 14 | ||||
| -rw-r--r-- | eventmq/conf.py | 4 | ||||
| -rw-r--r-- | eventmq/router.py | 4 |
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 | ||
| 31 | The address used to listen for connections from workers | 31 | The address used to listen for connections from workers |
| 32 | 32 | ||
| 33 | wal | ||
| 34 | ======= | ||
| 35 | Default: '/var/log/eventmq/wal.log' | ||
| 36 | |||
| 37 | Write-ahead Log for replaying messages received by the Router. Will | ||
| 38 | try to create the directory specified and append to the filename given. | ||
| 39 | Requires correct permissions to write to the given file. | ||
| 40 | |||
| 41 | wal_enabled | ||
| 42 | =============== | ||
| 43 | Default: False | ||
| 44 | |||
| 45 | Enable or disable the Write-ahead Log | ||
| 46 | |||
| 33 | ********* | 47 | ********* |
| 34 | Scheduler | 48 | Scheduler |
| 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 = '' | |||
| 97 | KILL_GRACE_PERIOD = 300 | 97 | KILL_GRACE_PERIOD = 300 |
| 98 | GLOBAL_TIMEOUT = 300 | 98 | GLOBAL_TIMEOUT = 300 |
| 99 | 99 | ||
| 100 | WAL_LOG = '/var/log/eventmq/wal.log' | 100 | WAL = '/var/log/eventmq/wal.log' |
| 101 | WAL_LOG_ENABLED = False | 101 | WAL_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) |