Skip to content

Commit

Permalink
Updated tokens for the new API.
Browse files Browse the repository at this point in the history
  • Loading branch information
valentindimov committed Apr 9, 2019
1 parent 8353064 commit a654a8f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion workers/common/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
};
4 changes: 2 additions & 2 deletions workers/common/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ class APIUpdater {
longevity,
longevityStart,
plod,
token: '123secure',
token: 'GOT2019ACCESStoken',
},
});
}
Expand All @@ -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',
},
});
}
Expand Down
10 changes: 8 additions & 2 deletions workers/uploader-predictions/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a654a8f

Please sign in to comment.