Skip to content

Commit

Permalink
Version 0.8.29
Browse files Browse the repository at this point in the history
- Should fix #182.
  • Loading branch information
jhuckaby committed May 27, 2019
1 parent 5e1797a commit e13a3a8
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
17 changes: 17 additions & 0 deletions bin/storage-cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,23 @@ var isArray = Array.isArray || util.isArray;
// prevent logging transactions to STDOUT
config.Storage.log_event_types = {};

// allow APPNAME_key env vars to override config
var env_regex = new RegExp( "^CRONICLE_(.+)$" );
for (var env_key in process.env) {
if (env_key.match(env_regex)) {
var env_path = RegExp.$1.trim().replace(/^_+/, '').replace(/_+$/, '').replace(/__/g, '/');
var env_value = process.env[env_key].toString();

// massage value into various types
if (env_value === 'true') env_value = true;
else if (env_value === 'false') env_value = false;
else if (env_value.match(/^\-?\d+$/)) env_value = parseInt(env_value);
else if (env_value.match(/^\-?\d+\.\d+$/)) env_value = parseFloat(env_value);

Tools.setPath(config, env_path, env_value);
}
}

// construct standalone storage server
var storage = new StandaloneStorage(config.Storage, function(err) {
if (err) throw err;
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Cronicle",
"version": "0.8.28",
"version": "0.8.29",
"description": "A simple, distributed task scheduler and runner with a web based UI.",
"author": "Joseph Huckaby <[email protected]>",
"homepage": "https://github.com/jhuckaby/Cronicle",
Expand Down Expand Up @@ -45,7 +45,7 @@
"pixl-config": "^1.0.5",
"pixl-webapp": "^1.0.17",
"pixl-class": "^1.0.2",
"pixl-tools": "^1.0.18",
"pixl-tools": "^1.0.23",
"pixl-logger": "^1.0.14",
"pixl-json-stream": "^1.0.6",
"pixl-request": "^1.0.21",
Expand Down

0 comments on commit e13a3a8

Please sign in to comment.