Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Making refresh rate controllable from CLI #30

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Making refresh rate controllable from CLI
  • Loading branch information
Aidan Macdonald committed Aug 12, 2021
commit 22d97024178a8f987dff99d6f637e9f0cadde3b6
3 changes: 2 additions & 1 deletion env.js
Original file line number Diff line number Diff line change
@@ -11,6 +11,7 @@ module.exports = function() {
.option('--changes-limit [value]', 'number of changes to batch')
.option('--postgres-table [value]', 'name of the postgres table to replicate to')
.option('-d, --daemon', 'continually replicate between CouchDB and PostgresSQL')
.option('-s, --sleep', 'Sleep interval in milliseconds between runs in daemon mode (default 10 * 60 * 60 * 1000 [ms])')
.option('-v, --verbose', 'verbose logging')
.action(function(source, target) {
couchdbUrl = source;
@@ -44,7 +45,7 @@ module.exports = function() {
couch2pgDocLimit: program['doc-limit'],
couch2pgChangesLimit: program['changes-limit'],
continuous: program.daemon,
sleepMs: 10 * 60 * 60 * 1000,
sleepMs: program['sleep'] || 10 * 60 * 60 * 1000,
postgresTable: program['postgres-table'] || 'couchdb'
};
};