Browse Source

Fixed non fatal error messages

master
pb 2 years ago
parent
commit
47b0116a7f
2 changed files with 13 additions and 4 deletions
  1. 12
    3
      index.js
  2. 1
    1
      win_verse.js

+ 12
- 3
index.js View File

// Instead of waiting for the root to be establised we start working at the current locatoin and then relocate when root changes. // Instead of waiting for the root to be establised we start working at the current locatoin and then relocate when root changes.
var runlogjson = `${selectedinstance.root}/.elxr/run-${runtimestamp}/run.log` var runlogjson = `${selectedinstance.root}/.elxr/run-${runtimestamp}/run.log`
ensureDirectoryExistence(runlogjson) ensureDirectoryExistence(runlogjson)
fs.writeFileSync(runlogjson, JSON.stringify( `Started ${runtimestamp}`)) // Initialize a new log file with "logrotate" for every run
fs.writeFileSync(runlogjson, JSON.stringify( { message : `Started ${runtimestamp}`, success:true})) // Initialize a new log file with "logrotate" for every run
Tasq.addlistener((e)=>{ fs.writeFileSync(runlogjson, ', ' + JSON.stringify( e ), { 'flag': 'a+' }) }) Tasq.addlistener((e)=>{ fs.writeFileSync(runlogjson, ', ' + JSON.stringify( e ), { 'flag': 'a+' }) })
var cli = require('./cliverse') var cli = require('./cliverse')
function isWin(){ return /^win/.test(process.platform) } function isWin(){ return /^win/.test(process.platform) }
return __acquireConfig(selected, { remote : 'userfork' } // PB : TODO -- accessiblity state should switch to public etc.. return __acquireConfig(selected, { remote : 'userfork' } // PB : TODO -- accessiblity state should switch to public etc..
, selected.instanceName + '-config-' + selected.node_env + `-${clusternodename}` , selected.instanceName + '-config-' + selected.node_env + `-${clusternodename}`
, function(e){ console.info('Customized node level config not found. This is not an Error. Will attempt with owner level config.'); , function(e){ console.info('Customized node level config not found. This is not an Error. Will attempt with owner level config.');
e.benign = true
return e; } return e; }
) )
} }
, ownerInstnace(selected) { return __acquireConfig(selected, { remote : 'userfork' } , ownerInstnace(selected) { return __acquireConfig(selected, { remote : 'userfork' }
, selected.instanceName + '-config-' + selected.node_env , selected.instanceName + '-config-' + selected.node_env
, function(e){ console.info('Customized user level config not found. This is not an Error. Will attempt global common instance config.'); , function(e){ console.info('Customized user level config not found. This is not an Error. Will attempt global common instance config.');
e.benign = true
return e } return e }
) )
} }
return __acquireData(selected, { remote : 'userfork' } return __acquireData(selected, { remote : 'userfork' }
, selected.instanceName + '-data-' + selected.node_env + `-${clusternodename}` , selected.instanceName + '-data-' + selected.node_env + `-${clusternodename}`
, function(e){ console.info('Customized node level data not found. This is not an Error. Will attempt with owner level config.'); , function(e){ console.info('Customized node level data not found. This is not an Error. Will attempt with owner level config.');
e.benign = true
return e; } return e; }
) )
} }
, ownerInstnace(selected) { return __acquireData(selected, { remote : 'userfork' } , ownerInstnace(selected) { return __acquireData(selected, { remote : 'userfork' }
, selected.instanceName + '-data-' + selected.node_env , selected.instanceName + '-data-' + selected.node_env
, function(e){ console.info('Customized user level data not found. This is not an Error. Will attempt global common instance config.'); , function(e){ console.info('Customized user level data not found. This is not an Error. Will attempt global common instance config.');
e.benign = true
return e } return e }
) )
} }
// https://git-scm.com/book/en/v2/Git-Tools-Credential-Storage // https://git-scm.com/book/en/v2/Git-Tools-Credential-Storage
// Git Credential storage... // Git Credential storage...
// git config --global credential.helper 'store --file ~/.gitcredentials' // git config --global credential.helper 'store --file ~/.gitcredentials'
// git credential fill
// protocol=https
// host=git.bbh.org.in
// username=bob
// password=pppp
// git credential-store --file ~/.gitcredentials store // git credential-store --file ~/.gitcredentials store

// // notepad C:/Program Files/Git/etc/gitconfig // // notepad C:/Program Files/Git/etc/gitconfig
// git config --edit --system // git config --edit --system
// git config --global credential.helper "store --file ~/gitcredentials"
// git credential fill
// git credential-store --file ~/git.store store // git credential-store --file ~/git.store store
// Find system git config // Find system git config

+ 1
- 1
win_verse.js View File

return r; return r;
}).catch((e) => { }).catch((e) => {
e.info = taskToRun.info; e.info = taskToRun.info;
taskToRun.statuslog.statuslog(e);
if(taskToRun.errHandler) throw taskToRun.errHandler(e) if(taskToRun.errHandler) throw taskToRun.errHandler(e)
taskToRun.statuslog.statuslog(e); //
// console.error(e) // console.error(e)
throw e; throw e;
}).finally(()=>{}) }).finally(()=>{})

Loading…
Cancel
Save