Skip to content

Commit

Permalink
chore: more explicit parseInt() radix
Browse files Browse the repository at this point in the history
  • Loading branch information
robinbourianes-kalisio committed Nov 15, 2023
1 parent 59609aa commit c5bfe03
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion jobfile-hydro-observations.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ let processData = (options) => {
let stationsInUrl = item.options.url.split("code_entite=")[1].split("&")[0].split(",")
if (item.data.count >20000) {

console.log('Too many results for task ' + item.id.substring(13) + ' : ' + item.data.count+ " should be less than 20000 "+ (parseInt(item.data.count)-20000) + " Observations are missing")
console.log('Too many results for task ' + item.id.substring(13) + ' : ' + item.data.count+ " should be less than 20000 "+ (parseInt(item.data.count, 10)-20000) + " Observations are missing")
console.log("Request had : "+stationsInUrl.length+" stations : "+stationsInUrl)
_.forEach(stationsInUrl, (code_station) => {
console.log("stations "+code_station+" had an estimation of "+dictstations["#"+code_station].est)
Expand Down
4 changes: 2 additions & 2 deletions jobfile-hydro-predictions.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ const outputDir = './output'
const dbUrl = process.env.DB_URL || 'mongodb://127.0.0.1:27017/kano'
const baseUrl = process.env.PREDIKT_URL || 'http://localhost:5000/predict'
const modelsPath = process.env.PREDIKT_MODELS_PATH || path.join('..', 'predikt', 'models', 'output', 'water_level_rnn', 'multiple', '24H')
const ttl = parseInt(process.env.TTL) || (7 * 24 * 60 * 60) // duration in seconds
const timeout = parseInt(process.env.TIMEOUT) || (30 * 60 * 1000) // duration in miliseconds
const ttl = parseInt(process.env.TTL, 10) || (7 * 24 * 60 * 60) // duration in seconds
const timeout = parseInt(process.env.TIMEOUT, 10) || (30 * 60 * 1000) // duration in miliseconds
// Now could be HP_RNN or HP_XGB depending on underlying prediction model
const variable = process.env.VARIABLE || 'HP'
const collection = 'hubeau-hydro-observations'
Expand Down
6 changes: 3 additions & 3 deletions jobfile-piezo-observations.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ const outputDir = './output'

// Configuration
const dbUrl = process.env.DB_URL || 'mongodb://127.0.0.1:27017/hubeau'
const ttl = parseInt(process.env.TTL) || (7 * 24 * 60 * 60) // duration in seconds
const history = parseInt(process.env.HISTORY) || 86400000 // duration in miliseconds (must be full days)
const timeout = parseInt(process.env.TIMEOUT) || (30 * 60 * 1000) // duration in miliseconds
const ttl = parseInt(process.env.TTL, 10) || (7 * 24 * 60 * 60) // duration in seconds
const history = parseInt(process.env.HISTORY, 10) || 86400000 // duration in miliseconds (must be full days)
const timeout = parseInt(process.env.TIMEOUT, 10) || (30 * 60 * 1000) // duration in miliseconds

let dictstations = null
let total=null
Expand Down

0 comments on commit c5bfe03

Please sign in to comment.