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

Method start_script

src/execution/execution_service.py:46–69  ·  view source on GitHub ↗
(self, config, user: User)

Source from the content-addressed store, hash-verified

44 return self._executors.get(execution_id)
45
46 def start_script(self, config, user: User):
47 audit_name = user.get_audit_name()
48
49 executor = ScriptExecutor(config, self._env_vars)
50 execution_id = self._id_generator.next_id()
51
52 audit_command = executor.get_secure_command()
53 LOGGER.info('Calling script #%s: %s', execution_id, audit_command)
54
55 executor.start(execution_id)
56 self._executors[execution_id] = executor
57 self._execution_infos[execution_id] = _ExecutionInfo(
58 execution_id=execution_id,
59 owner_user=user,
60 audit_name=audit_name,
61 audit_command=audit_command,
62 config=config)
63 self._active_executor_ids.add(execution_id)
64
65 self._fire_execution_started(execution_id, user)
66
67 self._add_post_finish_handling(execution_id, executor, user)
68
69 return execution_id
70
71 def stop_script(self, execution_id, user):
72 self.validate_execution_id(execution_id, user)

Callers 9

_execute_jobMethod · 0.80
test_logging_valuesMethod · 0.80
test_exit_codeMethod · 0.80
perform_executionMethod · 0.80
start_executionMethod · 0.80
_start_with_configMethod · 0.80
_start_with_configFunction · 0.80
postMethod · 0.80

Calls 8

get_secure_commandMethod · 0.95
startMethod · 0.95
ScriptExecutorClass · 0.90
_ExecutionInfoClass · 0.85
get_audit_nameMethod · 0.45
next_idMethod · 0.45

Tested by 7

test_logging_valuesMethod · 0.64
test_exit_codeMethod · 0.64
perform_executionMethod · 0.64
start_executionMethod · 0.64
_start_with_configMethod · 0.64
_start_with_configFunction · 0.64