diff --git a/src/index.js b/src/index.js index 13de279..1e7771e 100644 --- a/src/index.js +++ b/src/index.js @@ -17,8 +17,8 @@ const heroku = process.env.HEROKU_APP_URL || "https://dmhacker-youtube.herokuapp const interactive_wait = !(process.env.DISABLE_INTERACTIVE_WAIT === "true" || process.env.DISABLE_INTERACTIVE_WAIT === true || process.env.DISABLE_INTERACTIVE_WAIT === 1); -const cache_polling_interval = parseInt(process.env.CACHE_POLLING_INTERVAL || "5000", 10); -const ask_interval = parseInt(process.env.ASK_INTERVAL || "45000", 10); +const cache_polling_interval = Math.max(1000, parseInt(process.env.CACHE_POLLING_INTERVAL || "5000", 10)); +const ask_interval = Math.max(30000, parseInt(process.env.ASK_INTERVAL || "45000", 10)); // Variables relating to videos waiting for user input var buffer_search = {}; diff --git a/src/package-lock.json b/src/package-lock.json index f7f1dd5..7c90be1 100644 --- a/src/package-lock.json +++ b/src/package-lock.json @@ -1,6 +1,6 @@ { "name": "alexa-youtube-skill", - "version": "3.0.1", + "version": "3.0.2", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/src/package.json b/src/package.json index c95e50a..dfad2d1 100644 --- a/src/package.json +++ b/src/package.json @@ -1,6 +1,6 @@ { "name": "alexa-youtube-skill", - "version": "3.0.1", + "version": "3.0.2", "description": "Use Alexa to search YouTube for your favorite videos", "engines": { "node": "6.1.0"