Mostly working now. Need to work on updates for files and token refresh. And probably other thigns..
This commit is contained in:
@@ -241,6 +241,8 @@
|
||||
const api_auth_loop_interval = 100; // only runs on start up
|
||||
const open_tables_loop_interval = 10; // only runs on start up
|
||||
|
||||
const api_token_update_loop_interval = 120000; // loop forever
|
||||
|
||||
const update_idb_loop_interval = 500; // loop forever; update when check datetime has passed
|
||||
const idb_to_launcher_loop_interval = 5000; // loop forever; only run when one or more tables are updated
|
||||
const update_render_loop_interval = 10000; // loop forever; only run when the launcher object is safe
|
||||
@@ -456,8 +458,14 @@
|
||||
}, update_idb_loop_interval);
|
||||
|
||||
|
||||
var idb_to_launcher_loop = setInterval(function() {
|
||||
}, idb_to_launcher_loop_interval);
|
||||
var api_token_update_loop = setInterval(function() {
|
||||
api.api_token_request_async(axios, secret_key).then( function(result) {
|
||||
console.log('Setting temporary API token to axios Authorization header: '+result);
|
||||
axios.defaults.headers.common['Authorization'] = `Token ${result}`;
|
||||
api_temporary_token = result;
|
||||
return result;
|
||||
});
|
||||
}, api_token_update_loop_interval);
|
||||
|
||||
|
||||
var update_render_loop = setInterval(async function() {
|
||||
|
||||
Reference in New Issue
Block a user