Minor fixes

This commit is contained in:
Calvin Montgomery 2018-02-15 19:59:23 -08:00
parent 49661a95ab
commit d5f5c91b05
4 changed files with 12 additions and 1 deletions

View file

@ -44,6 +44,10 @@ function initChannelDumper(Server) {
var CHANNEL_SAVE_INTERVAL = parseInt(Config.get("channel-save-interval"))
* 60000;
setInterval(function () {
if (Server.channels.length === 0) {
return;
}
var wait = CHANNEL_SAVE_INTERVAL / Server.channels.length;
LOGGER.info(`Saving channels with delay ${wait}`);
Promise.reduce(Server.channels, (_, chan) => {

View file

@ -138,6 +138,10 @@ module.exports.query = function (query, sub, callback) {
}).catch(error => {
queryErrorCount.inc(1);
if (!sub) {
sub = [];
}
let subs = JSON.stringify(sub);
if (subs.length > 100) {
subs = subs.substring(0, 100) + '...';

View file

@ -28,6 +28,10 @@ const ECODE_MESSAGES = {
"The remote server's network is unreachable from this server. " +
"Please contact an administrator for assistance."
),
EHOSTUNREACH: e => (
"The remote server is unreachable from this server. " +
"Please contact the video server's administrator for assistance."
),
DEPTH_ZERO_SELF_SIGNED_CERT: e => (
'The remote server provided an invalid ' +

View file

@ -2,7 +2,6 @@
var fs = require("graceful-fs");
var path = require("path");
import { sprintf } from 'sprintf-js';
import { Logger as JsliLogger, LogLevel } from '@calzoneman/jsli';
import jsli from '@calzoneman/jsli';