From 0cf13bcc8d70d926a8ae19e8d2576ed0b409000a Mon Sep 17 00:00:00 2001 From: Micooz Date: Sun, 20 Aug 2017 17:12:55 +0800 Subject: [PATCH] bin: generate behaviours option in init --- bin/init.js | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/bin/init.js b/bin/init.js index 0ab3c50..59d1536 100644 --- a/bin/init.js +++ b/bin/init.js @@ -54,6 +54,15 @@ module.exports = function init({isMinimal}) { ] } ], + 'behaviours': { + 'on-preset-failed': { + 'name': 'random-timeout', + 'params': { + 'min': 10, + 'max': 40 + } + } + }, 'dns': [], 'dns_expire': 3600, 'timeout': timeout, @@ -89,9 +98,17 @@ module.exports = function init({isMinimal}) { } } ], + 'behaviours': { + 'on-preset-failed': { + 'name': 'random-timeout', + 'params': { + 'min': 10, + 'max': 40 + } + } + }, 'dns': [], 'dns_expire': 3600, - 'redirect': '', 'timeout': timeout, 'workers': 0, 'log_path': 'bs-server.log', @@ -100,9 +117,9 @@ module.exports = function init({isMinimal}) { if (isMinimal) { delete serverJson.transport; + delete serverJson.behaviours; delete serverJson.dns; delete serverJson.dns_expire; - delete serverJson.redirect; delete serverJson.timeout; delete serverJson.workers; delete serverJson.log_path;