config fixed, session server timeout increased
This commit is contained in:
@@ -28,7 +28,7 @@ const create_session = async (req, res, next) => {
|
||||
var websocket_url = await run_session(session_server.url, session_id, title)
|
||||
|
||||
if (!websocket_url) {
|
||||
next(new not_found_error('websocket_url not valid'))
|
||||
next(new not_found_error('can not run session'))
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ const get_db = async () => {
|
||||
try {
|
||||
await client.connect()
|
||||
} catch (err) {
|
||||
console.log('can not connect to database')
|
||||
return null
|
||||
}
|
||||
return client.db(database_name)
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
var request = require('request')
|
||||
let max_response_timeout = 1000
|
||||
const max_response_timeout = 1000
|
||||
const max_run_session_timeout = 10000
|
||||
|
||||
const get_fastest_session_server = async (free_servers) => {
|
||||
var fastest_server = null
|
||||
@@ -44,7 +45,7 @@ const run_session = async (server_url, session_id, title) => {
|
||||
var options = {
|
||||
url: server_url + '/session/run',
|
||||
method: "POST",
|
||||
timeout: max_response_timeout,
|
||||
timeout: max_run_session_timeout,
|
||||
headers: {
|
||||
"content-type": "application/json"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user