diff --git a/workers/common/config.js b/workers/common/config.js index 4fe1d64..7cf88f4 100644 --- a/workers/common/config.js +++ b/workers/common/config.js @@ -4,5 +4,5 @@ module.exports = { PREDICTIONS_NUM_YEARS: 20, AGE_MAXIMUM: 100, GOT_SHOW_BEGIN: 298, //first year the show took place - GOT_API_BASE_URL: 'https://gotdata.northeurope.cloudapp.azure.com/api', + GOT_API_BASE_URL: 'https://api.got.show/api', }; diff --git a/workers/common/utils.js b/workers/common/utils.js index 75adc32..279803f 100644 --- a/workers/common/utils.js +++ b/workers/common/utils.js @@ -433,7 +433,7 @@ class APIUpdater { longevity, longevityStart, plod, - token: '123secure', + token: 'GOT2019ACCESStoken', }, }); } @@ -455,7 +455,7 @@ class APIUpdater { return request.post(config.GOT_API_BASE_URL + `/${dataset}/bayesean-attributes/update`, { json: { attributes: attrs, - token: '123secure', + token: 'GOT2019ACCESStoken', }, }); } diff --git a/workers/uploader-predictions/index.js b/workers/uploader-predictions/index.js index 80aba17..29196e5 100644 --- a/workers/uploader-predictions/index.js +++ b/workers/uploader-predictions/index.js @@ -7,12 +7,18 @@ const config = require('../common/config'); // update book predictions on server for (let name in bookPred) { - console.log(await updater.updatePLODLongevity('book', name, bookPred[name], config.GOT_CURRENT_YEAR_BOOK, 1 - bookPred[name][0])); + try { + console.log(await updater.updatePLODLongevity('book', name, bookPred[name], config.GOT_CURRENT_YEAR_BOOK, 1 - bookPred[name][0])); + } + catch(error) {} //TODO ? } // update show predictions on server for (let name in showPred) { - console.log(await updater.updatePLODLongevity('show', name, showPred[name], config.GOT_CURRENT_YEAR_SHOW, 1 - showPred[name][0])); + try { + console.log(await updater.updatePLODLongevity('show', name, showPred[name], config.GOT_CURRENT_YEAR_SHOW, 1 - showPred[name][0])); + } + catch(error) {} //TODO ? } // output some final statistics