diff --git a/bin/bastion.py b/bin/bastion.py index 223a005..c4644e1 100755 --- a/bin/bastion.py +++ b/bin/bastion.py @@ -189,13 +189,8 @@ def run(self): for idiom in idioms: tokens = idiom.split() if tokens == comargs[:len(tokens)]: - action = method - - #-- create a process tracking structure. - proc = { - 'task.started': datetime.datetime.now().isoformat(), - 'task.session': opts.get('task.session', self.session) - } + action = method + request = CARP.Request(idiom, comargs[len(tokens):]) #-- execute the action within crash guardrails try: @@ -204,12 +199,7 @@ def run(self): tb = traceback.format_exception(err) answer = CRASHED( ''.join(tb), tb ) #-- always log crashes! - answer['context']['log.scope'] = '*' - - proc['task.ended'] = datetime.datetime.now().isoformat() - - #-- include the user's request as part of the answered report - answer['request'] = ' '.join(comargs) + answer.context['log.scope'] = '*' #-- embed the process tracking info as part of the reply context for k, v in proc.items():