MCPcopy Index your code
hub / github.com/bugy/script-server / ExecutionLoggingController

Class ExecutionLoggingController

src/execution/logging.py:410–443  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

408
409
410class ExecutionLoggingController:
411 def __init__(self, execution_service: ExecutionService, execution_logging_service):
412 self._execution_logging_service = execution_logging_service
413 self._execution_service = execution_service
414
415 def start(self):
416 execution_service = self._execution_service
417 logging_service = self._execution_logging_service
418
419 def started(execution_id, user):
420 script_config = execution_service.get_config(execution_id, user)
421 audit_name = user.get_audit_name()
422 owner = user.user_id
423 all_audit_names = user.audit_names
424 output_stream = execution_service.get_anonymized_output_stream(execution_id)
425 audit_command = execution_service.get_audit_command(execution_id)
426 parameter_value_wrappers = script_config.parameter_values
427
428 logging_service.start_logging(
429 execution_id,
430 audit_name,
431 owner,
432 audit_command,
433 output_stream,
434 all_audit_names,
435 script_config,
436 parameter_value_wrappers)
437
438 def finished(execution_id, user):
439 exit_code = execution_service.get_exit_code(execution_id)
440 logging_service.write_post_execution_info(execution_id, exit_code)
441
442 self._execution_service.add_start_listener(started)
443 self._execution_service.add_finish_listener(finished)
444
445
446def _rstrip_once(text, char):

Callers 2

mainFunction · 0.90
setUpMethod · 0.90

Calls

no outgoing calls

Tested by 1

setUpMethod · 0.72