Comparing version 0.0.3 to 0.0.4
@@ -14,3 +14,3 @@ 'use strict'; | ||
const LOGS_SOURCE = 'api/kineneService'; | ||
const LOGS_SOURCE = 'kinene'; | ||
@@ -31,6 +31,9 @@ const internals = {}; | ||
if (!kinesisBackupUrl) { | ||
this.localLog(['warn'], 'No options.kinesisBackupUrl specified'); | ||
} | ||
// NOTE TODO setup like this, in prod if this backup goes down everything goes down | ||
// We need to make something more resilient here in case it goes down | ||
if (!testMode) { | ||
// Ping the backup /health route | ||
if (kinesisBackupUrl && !testMode) { | ||
@@ -40,2 +43,3 @@ let statusCode; | ||
try { | ||
// Ping the /health route | ||
const rawResult = await Wreck.request('GET', `${kinesisBackupUrl}/health`); | ||
@@ -51,6 +55,2 @@ statusCode = rawResult.statusCode; | ||
} | ||
if (!kinesisBackupUrl) { | ||
this.localLog(['warn'], 'No options.kinesisBackupUrl specified'); | ||
} | ||
} | ||
@@ -99,3 +99,3 @@ | ||
this.localLog(['error'], { | ||
error: `Kinesis failed; no kinesisBackupUrl provided: ${err.message}` | ||
error: `Kinesis failed; no kinesisBackupUrl provided.\n\nError: ${err.message}` | ||
}); | ||
@@ -102,0 +102,0 @@ |
{ | ||
"name": "kinene", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "author": "wswoodruff", |
7104