From 422f99e37e5f7f97590b764e0646d2ecde6dcfd4 Mon Sep 17 00:00:00 2001 From: Guille Date: Sun, 23 Jun 2024 07:46:16 +0200 Subject: [PATCH] Switch urls to production api --- workflows/idf/module/module.js | 6 ++---- workflows/meb/module/module.js | 8 ++------ workflows/retrofit v2/module/module.js | 10 ++++------ workflows/retrofit/module/module.js | 6 ++---- 4 files changed, 10 insertions(+), 20 deletions(-) diff --git a/workflows/idf/module/module.js b/workflows/idf/module/module.js index 90d410f..27186c3 100644 --- a/workflows/idf/module/module.js +++ b/workflows/idf/module/module.js @@ -1,10 +1,8 @@ const { BrowserWindow, app } = require('electron') const path = require('path') const dotenv = require('dotenv') -//const session_start = 'https://nextgenerations-cities.encs.concordia.ca/api/v1.4/session/start' -//const retrofit_results = 'https://nextgenerations-cities.encs.concordia.ca/api/v1.4/persistence/retrofit-results' -const session_start = 'http://127.0.0.1:15789/v1.4/session/start' -const idf_generator = 'http://127.0.0.1:15789//v1.4/energy-plus/idf-generator' +const session_start = 'https://nextgenerations-cities.encs.concordia.ca/api/v1.4/session/start' +const idf_generator = 'https://nextgenerations-cities.encs.concordia.ca/api/v1.4/energy-plus/idf-generator' exports.run = async (application, param, tmp_path) => { const building = param['building'] diff --git a/workflows/meb/module/module.js b/workflows/meb/module/module.js index d9016a7..5a31ffc 100644 --- a/workflows/meb/module/module.js +++ b/workflows/meb/module/module.js @@ -3,12 +3,8 @@ const fs = require('fs') const path = require('path') const { Blob } = require('buffer') const dotenv = require('dotenv') -//const session_start = 'https://nextgenerations-cities.encs.concordia.ca/api/v1.4/session/start' -//const insel_meb = 'https://nextgenerations-cities.encs.concordia.ca/api/v1.4/workflow/insel-monthly-energy-balance' - -const session_start = 'http://127.0.1:15789/v1.4/session/start' -const insel_meb = 'http://127.0.0.1:15789/v1.4/workflow/insel-monthly-energy-balance' - +const session_start = 'https://nextgenerations-cities.encs.concordia.ca/api/v1.4/session/start' +const insel_meb = 'https://nextgenerations-cities.encs.concordia.ca/api/v1.4/workflow/insel-monthly-energy-balance' exports.run = async (application, param, tmp_path) => { console.log(`Executing ${application}`) diff --git a/workflows/retrofit v2/module/module.js b/workflows/retrofit v2/module/module.js index 9006bcb..b506578 100644 --- a/workflows/retrofit v2/module/module.js +++ b/workflows/retrofit v2/module/module.js @@ -1,10 +1,8 @@ const { BrowserWindow, app } = require('electron') const path = require('path') const dotenv = require('dotenv') -//const session_start = 'https://nextgenerations-cities.encs.concordia.ca/api/v1.4/session/start' -//const retrofit_results = 'https://nextgenerations-cities.encs.concordia.ca/api/v1.4/persistence/retrofit-results' -const session_start = 'http://127.0.0.1:15789/v1.4/session/start' -const retrofit_results = 'http://127.0.0.1:15789/v1.4/persistence/full-retrofit-results' +const session_start = 'https://nextgenerations-cities.encs.concordia.ca/api/v1.4/session/start' +const retrofit_results = 'https://nextgenerations-cities.encs.concordia.ca/api/v1.4/persistence/full-retrofit-results' exports.run = async (application, param, tmp_path) => { buildings = param['buildings'] @@ -192,11 +190,11 @@ exports.run = async (application, param, tmp_path) => { } else { console.log('unautorized retrofit') + BrowserWindow.fromId(1).webContents.send('task-completed', `

Received code ${response.status} on results request

`) } } else { - console.log(response) - console.log(JSON.stringify(response)) console.log('unautorized session start') + BrowserWindow.fromId(1).webContents.send('task-completed', `

Received code ${response.status} on session start

`) } } \ No newline at end of file diff --git a/workflows/retrofit/module/module.js b/workflows/retrofit/module/module.js index 1d904e5..d74130e 100644 --- a/workflows/retrofit/module/module.js +++ b/workflows/retrofit/module/module.js @@ -1,10 +1,8 @@ const { BrowserWindow, app } = require('electron') const path = require('path') const dotenv = require('dotenv') -//const session_start = 'https://nextgenerations-cities.encs.concordia.ca/api/v1.4/session/start' -//const retrofit_results = 'https://nextgenerations-cities.encs.concordia.ca/api/v1.4/persistence/retrofit-results' -const session_start = 'http://127.0.0.1:15789/v1.4/session/start' -const retrofit_results = 'http://127.0.0.1:15789/v1.4/persistence/retrofit-results' +const session_start = 'https://nextgenerations-cities.encs.concordia.ca/api/v1.4/session/start' +const retrofit_results = 'https://nextgenerations-cities.encs.concordia.ca/api/v1.4/persistence/retrofit-results' exports.run = async (application, param, tmp_path) => { buildings = param['buildings']